Rounding errors and paradox currency fields 
Author Message
 Rounding errors and paradox currency fields

Hi all,

Has anyone had any experience with storing money values in Paradox
tables? I have a largish invoicing application which continually gives
the users rounding errors, because it insists on storing more than 2
decimal places in the fields.

Is there a way of enforcing the number of decimal places stored in a
paradox field? I've tried the old "x := (Int(x / 100) * 100)" on the
value before it's written, but even dividing by 100 doesn't guarantee
2 decimal places!

The only other option I have at the moment is to convert all the
currency fields to integers, and replace all my TDBEdits with TEdits -
something I _really_ don't want to have to do...

Any help would be appreciated.

Cheers,
Mab.



Sun, 25 Mar 2001 03:00:00 GMT  
 Rounding errors and paradox currency fields

Quote:

>Is there a way of enforcing the number of decimal places stored in a
>paradox field? I've tried the old "x := (Int(x / 100) * 100)" on the
>value before it's written, but even dividing by 100 doesn't guarantee
>2 decimal places!
>Mab.

Mab,

I normalize my $$ before storing using the BDE Api functions that do BCD
conversions (FloatToBCD BCDToFloat I think, can't look right now).

Hope this helps
Frank



Mon, 26 Mar 2001 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Currency field rounding up from 10.25 to 11.00 why?

2. problem with Access Currency Field

3. Currency field display format

4. Alternative for currency field

5. Currency Fields

6. Currency Field lossing precision

7. Money field type same as Currency data type??

8. D1, Interbase, and currency fields

9. TechTips: Explaining rounding-error in reports

10. Rounding errors in Access db

11. Rounding Off or Precision Error

12. DBGRID Field is rounding to nearest dollar

 

 
Powered by phpBB® Forum Software