Hi,
Using RemObjects/SDAC to insert some data into a SQL2008 system (64bit), I’m occasionally seeing the message,
Operand type clash: datetime2 is incompatible with int(#0)
When one of the parameters is a DateTime field.
Any ideas?
SDAC SQL2008 DateTime2
Hello,
The point is that in SQL Server 2008 implicit add for the datetime2 type was disabled because of its increased precision. Therefore the SQL code likewill cause the "Operand type clash: datetime2 is incompatible with int" server error. You can read more about it here: http://sqlblog.com/blogs/aaron_bertrand ... eries.aspx
The point is that in SQL Server 2008 implicit add for the datetime2 type was disabled because of its increased precision. Therefore the SQL code like
Code: Select all
select sysdatetime() + 1
If I give you an example:
UPDATE myTable SET myDateField = :MyDateParameter
using this in RemObjects with SDAC creates you a parameter of
MyDateParameter and by default set to type Unknown
When you come to use this update statement, the code sets the date input parameter and executes the update statement.
I have no control over the field type used as its managed by (far as I can see) by SDAC
UPDATE myTable SET myDateField = :MyDateParameter
using this in RemObjects with SDAC creates you a parameter of
MyDateParameter and by default set to type Unknown
When you come to use this update statement, the code sets the date input parameter and executes the update statement.
I have no control over the field type used as its managed by (far as I can see) by SDAC