TBCDField / TFmtBCDField issue

Discussion of open issues, suggestions and bugs regarding usage of dbExpress drivers for SQL Server in Delphi and C++Builder
Post Reply
Marcos

TBCDField / TFmtBCDField issue

Post by Marcos » Fri 07 Oct 2005 20:17

Hello,

We want to map any decimal field in mssql to TFMTBCDField, regardless of number of significant digits. Is there such option in the dbx driver for mssql?

Thanks in advance,
Marcos

Ikar
Posts: 1693
Joined: Thu 28 Oct 2004 13:56

Post by Ikar » Mon 10 Oct 2005 13:34

Do you use very old driver version (earlier when 1.80)?
By default, all decimal (numeric) fields map to TFMTBCDField. You can disable this behavior by setting EnableBCD to False.

Guest

Post by Guest » Mon 10 Oct 2005 18:50

No, we're using v2.50. The field is declared as follows

myfield decimal(6, 2) NULL

This field is always created as TBCDField (or floatfield if enable bcd=false)

Ikar
Posts: 1693
Joined: Thu 28 Oct 2004 13:56

Post by Ikar » Tue 11 Oct 2005 08:23

This is dbExpress limitation. You should use decimal type with scale larger than 4 or precision larger than 14 to get TFMTBCDField

Post Reply