SQL server and datetime2
Posted: Mon 27 Jul 2015 10:08
Hi, I'm using Builder c++ 6 and UniDAC to connect to SQL Server.
I need to handle date time values at tenth of milliseconds granularity.
If I try to insert with UniSQL
UniSQL->Params->ParamByName("EventDateTime")->Value = "2015-07-27 11:44:55.1234000";
I have this error
Implicit conversion from data type sql_variant to datetime2 is not allowed. Use the CONVERT function to run this query.'
I need to read too the data with tdatagrid but I get a TDateTime field, but it is only up to milliseconds.
This problem occurs also if I use prNativeClient. Is prOLEDB better?
Which datatype should I use for handling tenth of milliseconds granularity in c++ builder 6?
Thank you
Regards
Alessandro Miorelli
I need to handle date time values at tenth of milliseconds granularity.
If I try to insert with UniSQL
UniSQL->Params->ParamByName("EventDateTime")->Value = "2015-07-27 11:44:55.1234000";
I have this error
Implicit conversion from data type sql_variant to datetime2 is not allowed. Use the CONVERT function to run this query.'
I need to read too the data with tdatagrid but I get a TDateTime field, but it is only up to milliseconds.
This problem occurs also if I use prNativeClient. Is prOLEDB better?
Which datatype should I use for handling tenth of milliseconds granularity in c++ builder 6?
Thank you
Regards
Alessandro Miorelli