IBDAC with Clientdatasets
Posted: Thu 18 Jul 2013 07:10
I am having a problem with Numeric(18,2) Firebird datatypes working properly when using IBDac with Clientdatasets.
I have verified that the problem occurs with Delphi 7 and Delphi 2009.
This is how the problem can be reproduced:
Using Firebird 2.5.X, create a database Dialect 3.
Create any table with a numeric(18,2) field and fill in data.
In a blanc delphi project, use an IBCConnection, IBCQuery, Datasetprovider, Clientdataset, Datasource, then a simple dbEdit to show the value of that field.
In the options of the IBCConnection, set EnableBCD = True and EnableFMTBCD = True.
In design time, open the clientdataset:
In Delphi 7, I get a BCD overflow
In Delphi 2009, the DBEdit component shows 0 although there are values that are non zero.
Connecting the DBEdit directly to the IBCQuery shows the correct values.
Setting in the database options EnableBCD = False works fine however, according to the IBDac help system, the EnableFMTBCD is for large integer values and not numeric(18,2) types.
Any help is appreciated.
Thanks
Salim
I have verified that the problem occurs with Delphi 7 and Delphi 2009.
This is how the problem can be reproduced:
Using Firebird 2.5.X, create a database Dialect 3.
Create any table with a numeric(18,2) field and fill in data.
In a blanc delphi project, use an IBCConnection, IBCQuery, Datasetprovider, Clientdataset, Datasource, then a simple dbEdit to show the value of that field.
In the options of the IBCConnection, set EnableBCD = True and EnableFMTBCD = True.
In design time, open the clientdataset:
In Delphi 7, I get a BCD overflow
In Delphi 2009, the DBEdit component shows 0 although there are values that are non zero.
Connecting the DBEdit directly to the IBCQuery shows the correct values.
Setting in the database options EnableBCD = False works fine however, according to the IBDac help system, the EnableFMTBCD is for large integer values and not numeric(18,2) types.
Any help is appreciated.
Thanks
Salim