Page 1 of 1

SQL Server 2008

Posted: Wed 19 May 2010 08:42
by azago
I use Delphi 2010 and SDAC 4.80.0.57.
I use the same program with SQL Server 2005 and SQl Server 2008.

When i read a Date Time Field with

SQLQuery.FieldByName('DataIpoteca').AsDateTime

the Sql Server 2008 return a Convert Error with error

"2010-12-01" is not a valid date e time
the field dataIpoteca is SmallDateTime in SQL

in the SQL server 2005 the function running correct.

it's possible to change the format date character a the SDAC level reading the SQL server version ???

Exists other way to solve the problem ??

Posted: Thu 20 May 2010 06:42
by Dimon
To solve the problem try to use the SQL Server Native Client provider and check if the problem still exists. For this set the TMSConnection.Options.Provider property to the prNativeClient value.

Posted: Sun 13 Jun 2010 15:34
by hmelihkara
or simply install sqlncli.msi from the sql server 2008 setup disk to fix the datetime problems...