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

梦想的初衷 提交于 2020-01-02 05:19:45

问题


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"


回答1:


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.



来源:https://stackoverflow.com/questions/6356578/delphi-6-ado-ms-database-date-field-is-same-as-ftwidestring

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!