Главная страница | назад





Article #17708: BCD Number Truncate to only 4 Decimal Places

 Question and Answer Database
FAQ2708D.txt — BCD Number Truncate to only 4 Decimal Places
Category :Database/VCL
Platform :All-32Bit
Product :
Question:
When I use the BDE setting ENABLE BCD, all my data is
truncated to 4 decimal places. Is this as designed?
Answer:
Delphi uses the Delphi Currency type for holding the BCD
values internally. This is a actually a signed 64 bit
integer (comp) with the last 4 digits used for the decimal
places.
If a BCD value from BDE that contains more than 4
decimals, an exception is raised.
The only way to work with more decimal places than 4 is to
call GetData on the field and work directly with the FMTBCD
structure.
4/2/99 12:12:52 PM

Last Modified: 01-SEP-99