Subject | RE: [IBO] retrieving size and precision of numeric fields |
---|---|
Author | Salim Naufal |
Post date | 2003-06-09T12:57:25Z |
Hi Helen, I have set the Field's Currency property to True In both the
ClientDataSet and in the IBOQuery. I get two digits for display as expected.
However, the weird part is that the calculations take into account 4 digits
instead of 2.
I get 3 credits of $33.33 Instead of $33.33, $33.33 and $33.34
Any ideas? I hope to avoid using rounding functions for every field.
Thanks
Salim
-----Original Message-----
From: Helen Borrie [mailto:helebor@...]
Sent: Monday, June 09, 2003 11:50
...
So, back to original problem. Forget about the Precision property of
TBCDField, or set it to the precision of the stored number. It only seems
to matter for databases that store precision > 20 (which doesn't include
Fb/IB). Use the Currency property set to True instead. This will represent
your value with the required two digits and it should pass correctly over
to the TClientDataSet. If not, post back here and tell us.
ClientDataSet and in the IBOQuery. I get two digits for display as expected.
However, the weird part is that the calculations take into account 4 digits
instead of 2.
I get 3 credits of $33.33 Instead of $33.33, $33.33 and $33.34
Any ideas? I hope to avoid using rounding functions for every field.
Thanks
Salim
-----Original Message-----
From: Helen Borrie [mailto:helebor@...]
Sent: Monday, June 09, 2003 11:50
...
So, back to original problem. Forget about the Precision property of
TBCDField, or set it to the precision of the stored number. It only seems
to matter for databases that store precision > 20 (which doesn't include
Fb/IB). Use the Currency property set to True instead. This will represent
your value with the required two digits and it should pass correctly over
to the TClientDataSet. If not, post back here and tell us.