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





Article #22115: Setting default value for decimal places in the BDE.

Question:

How can I control the number of decimal places in a floating point number when I do a BatchMove to a text file?

Answer:

Field formats in a text file are stored in a schema file which has the same name as the text file with a .sch extension. When doing a batch move to a text file (batCopy) a .sch file is automatically created. All floating point fields are provided by default with two decimal places of accuracy. After the schema file is created you can edit it and change the number of decimal places to another value. This new value will be used in future batch moves.

The default number of decimal places is controlled by the BDE parameter DECIMALDIGITS which can be found in the BDE administrator under: Configuration | System | Formats | Number. Since this is a BDE parameter it can also be changed at runtime by changing the value in the registry at: HKEY_LOCAL_MACHINE\SOFTWARE\Borland\Database Engine\Settings\SYSTEMFORMATSNUMBER

Last Modified: 27-OCT-00