Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Delphi 6, ADO, MS database "Date" field is same as ftWideString

I want to copy elements to a remote MS-SQL database. I got conversion error on it.

When I checked the ADOTable structure I saw the MS field

WHENCREATED DATE [NULL]

is converted to

ftWideString 10

Hmmmmm....

Is it normal? Or I can set something to Date fields are come as TDateTime?

The Provider is "SQLOLEDB.1"

like image 441
durumdara Avatar asked Jun 15 '11 10:06

durumdara


1 Answers

Its a DATE (yyyy-mm-dd) type which was introduced in SQL Server 2008 as an alternative to the DATETIME type.

Because SQLOLEDB.1 precedes this there is a backward conversion to DBTYPE_WSTR, using an updated provider (SQLNCLI) would be preferable.

like image 57
Alex K. Avatar answered Sep 28 '22 03:09

Alex K.