dbExpress不读取TimeStamp字段的毫秒部分 [英] dbExpress does not read the milliseconds part of TimeStamp fields

查看:118
本文介绍了dbExpress不读取TimeStamp字段的毫秒部分的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

最近一些Delphi / InterBase应用程序显示

Recently some Delphi / InterBase applications display

记录未由其他用户找到或更改

它们使用dbExpress的默认TSQLQuery / TClientDataSet(或TSimpleDataSet)组件。

They use the default TSQLQuery/TClientDataSet (or TSimpleDataSet) components of dbExpress.

我们发现在数据库表中,一个字段与

We found that in the database table, a field was stored with milliseconds by a non-dbExpress application.

看起来dbExpress并未从数据库读取毫秒,而是在更新表的 where条件下使用了该截断后的值。 SQL语句,因此没有要更新的匹配记录。

It looks like dbExpress did not read the milliseconds from DB, and use that truncated value in the 'where' condition of the update table SQL statement, so there was no matching record to be updated.

更新:我们在Delphi应用程序中使用TSQLTimeStamp字段。没有OnBeforePost处理程序正在修改字段值。

Update: we are using TSQLTimeStamp fields in the Delphi application. No OnBeforePost handlers are modifying the field value.

更新2

在IBExternals.pas中可以看到PCTimeStructure没有毫秒部分。因此,按设计不支持Delphi(2009)中的InterBase毫秒级支持。

As can be seen in IBExternals.pas PCTimeStructure does not have a milliseconds part. So 'by design' no support of milliseconds for InterBase in Delphi (2009).

有人知道是否在更高版本的Delphi中添加了ms支持吗?

Does anybody know if ms support has been added in a later version of Delphi?

推荐答案

我猜这是 isc_decode_timestamp Interbase / Firebird不支持毫秒的客户端API。 此处是与Firebird跟踪器相关的问题。

I guess it's the isc_decode_timestamp Interbase/Firebird client API which doesn't support milliseconds. Here is a related Firebird tracker issue.

更新:另请参见以下答案

这篇关于dbExpress不读取TimeStamp字段的毫秒部分的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆