Hi, I have problems with new data types for MS SQL Server 2008 (R2):
DATE, TIME, DATETIME2
When I use UniQuery I get this:
A = DATE field
B = TIME(0) field
C = DATETIME2(0) field
UniQuery.FieldByName("A").DataType = ftWideString // correct is = ftDate
UniQuery.FieldByName("B").DataType = ftWideString // correct is = ftTime
UniQuery.FieldByName("C").DataType = ftWideString // correct is = ftDateTime
Thanks, Roman
MS SQL 2008 (R2) new data types
-
AndreyZ
Re: MS SQL 2008 (R2) new data types
Hello,
This problem is caused by the OLEDB provider. OLEDB provider returns DATE, TIME, DATETIME, and DATETIME2 columns in the string format. To solve the problem, you should use the SQL Native Client provider. To use SQL Native Client, you should set the OLEDBProvider specific option to prNativeClient. Here is an example:
This problem is caused by the OLEDB provider. OLEDB provider returns DATE, TIME, DATETIME, and DATETIME2 columns in the string format. To solve the problem, you should use the SQL Native Client provider. To use SQL Native Client, you should set the OLEDBProvider specific option to prNativeClient. Here is an example:
Code: Select all
UniConnection.SpecificOptions.Values['OLEDBProvider'] := 'prNativeClient';