Problem with datetime(2?) on SQL 2008

Discussion of open issues, suggestions and bugs regarding SDAC (SQL Server Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
Posts: 1
Joined: Fri 28 May 2010 09:11

Problem with datetime(2?) on SQL 2008

Post by Omedius » Fri 28 May 2010 09:19

I have a problem when opening a TMSQuery

Code: Select all

The code is not written by me and it works fine on pre-2008 SQL Server (tried on 2000, not sure about 2005, but since datetime2 was introduced in 2008 as far as I remember, 2005 should fine but that is not the point).

I get an exception on SQL 2008, which I do not get on SQL 2000. Seems that by default the components consider datetime2 as the default data type for dates on SQL engines versions 10 and up, followed by some restrictions.

I get an exception
EMSError with message 'Explicit conversion from data type datetime2 to float is not allowed'.
I cannot place a breakpoint anywhere, the app crashes on TMSQuery.Open line.

Could you please suggest, what might be the cause of such behaviour. We do not use datetime2 type at all in the whole database as long as SQL 2008 support is still under testing and not in production.

SDAC version 4.5.

Thank you,


Devart Team
Posts: 2888
Joined: Mon 05 Mar 2007 16:32

Post by Dimon » Fri 28 May 2010 11:16

We have fixed this problem in the latest SDAC build ( Please, upgrade to this build to solve the problem.

Post Reply