FireBird and DBExpress with BigInt Field

1 view
Skip to first unread message

电脑玩家

unread,
Dec 13, 2009, 8:34:55 AM12/13/09
to 挨踢技术
Int64 可以装下 LongWord

但 FireBird 的 BigInt 字段,在 DbExpress 下,自动创建的是 TFMTBCDField 字段。把一个
LongWord 通过 AsInteger 输入,如果超过了 Integer(32位)的范围,则 LongWord 变负数了。

这里该怎么搞?

电脑玩家

unread,
Dec 13, 2009, 9:10:50 PM12/13/09
to 挨踢技术
测试了一下 SQL SERVER,它的 BIGINT 字段在 ClientDataSet 里面创建的字段是 TLargeIntField,这个
字段除了有个 AsInteger 之外,还有 AsLargeInt 属性。AsInteger 属性对应的类型是 LongInteger 实际上
就是 32位整数,也就是普通的 Integer;而 AsLargeInt 属性对应的类型是 BigInt,是64位的整数。

对于 TFMTBCDField 来说,用 AsInteger 肯定不行,因为对应的是 32 位数。但测试了使用 Value 属性,可以输入超过
32位整数范围的值,比如 High(LongWord0 - 100;

Reply all
Reply to author
Forward
0 new messages