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.