SQL Server 2008

Discussion of open issues, suggestions and bugs regarding SDAC (SQL Server Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
azago
Posts: 6
Joined: Fri 04 Jul 2008 08:25
Location: Italy

SQL Server 2008

Post by azago » Wed 19 May 2010 08:42

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 ??

Dimon
Devart Team
Posts: 2885
Joined: Mon 05 Mar 2007 16:32

Post by Dimon » Thu 20 May 2010 06:42

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.

hmelihkara
Posts: 21
Joined: Fri 09 Nov 2007 23:29

Post by hmelihkara » Sun 13 Jun 2010 15:34

or simply install sqlncli.msi from the sql server 2008 setup disk to fix the datetime problems...

Post Reply