Subject RE: [IBO] Precision and Size of TBCDFields
Author Salim Naufal
From what I can understand regarding the meaning of those fields, the
Size field is supposed to reflect the number of digits after the decimal

Say that a clientdataset is used with a TIBOQuery and that some
calculations are done similar to those done in accounting, by having
Size = 8 instead of 2, the client dataset will store 8 digits after the
decimal point and therefore all of the calculations will be done using
those 8 digits.
This will yield a discrepancy between the values stored in the database
and those in the client dataset. This is quite annoying in an accounting
package when the Sum(Debits) = Sum(Credits) in the clientdataset and
when stored in the Database, a difference shows up.

I have tried to change the size field of the TBCDFields found in the
TIBOQuery. The minute the dataset is opened, the Size is reset to 8.

Do you see a way around the problem? I can illustrate it in a small
program that can be placed on my website.



-----Original Message-----
From: Jason Wharton [mailto:jwharton@...]
Sent: Monday, October 28, 2002 7:08 PM
Subject: Re: [IBO] Precision and Size of TBCDFields

Why is that a problem? From what I could tell, those values were

Jason Wharton
CPS - Mesa AZ

-- We may not have it all together --
-- But together we have it all --

----- Original Message -----
From: "Salim Naufal" <salim.naufal@...>
To: <>
Sent: Monday, October 28, 2002 8:00 AM
Subject: [IBO] Precision and Size of TBCDFields

> I am converting from IBX to IBO using the TIBOQuery components.
> In my Firebird 1.0 database, I have a field that is defines as
> Numeric(18,2).
> With IBX, the corresponding TBCDFields field has the Size and
> set to 2 and 18 respectively.
> With IBO, the Size becomes 8 and the Precision 0. Is there a way of
> correcting that problem?
> Thanks
> Salim
> PS. The IBO version in use is: 4.2.I