Delphi 6,ADO,MS数据库“日期”字段与ftWideString相同 [英] Delphi 6, ADO, MS database "Date" field is same as ftWideString
问题描述
我想将元素复制到远程MS-SQL数据库。
我收到转换错误。
I want to copy elements to a remote MS-SQL database. I got conversion error on it.
当我查看ADOTable结构时,我看到MS字段
When I checked the ADOTable structure I saw the MS field
WHENCREATED DATE [NULL]
转换为
is converted to
ftWideString 10
Hmmmmm ....
Hmmmmm....
是否正常?或者我可以设置一些东西到日期字段是作为TDateTime?
Is it normal? Or I can set something to Date fields are come as TDateTime?
提供者是SQLOLEDB.1
The Provider is "SQLOLEDB.1"
推荐答案
它在SQL Server 2008中引入的 DATE
(yyyy-mm-dd)类型,作为 DATETIME
type。
Its a DATE
(yyyy-mm-dd) type which was introduced in SQL Server 2008 as an alternative to the DATETIME
type.
因为 SQLOLEDB.1
在此之前有一个向后转换到 DBTYPE_WSTR
,使用更新的提供程序(SQLNCLI)将是更可取的。
Because SQLOLEDB.1
precedes this there is a backward conversion to DBTYPE_WSTR
, using an updated provider (SQLNCLI) would be preferable.
这篇关于Delphi 6,ADO,MS数据库“日期”字段与ftWideString相同的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!