|
I think the one upstairs did not understand my question.
my question is:
How to input the data type of decimal(20, 8) in the database on the client does not consider changing the decimal of the database to other types. How can you enter a number with 12 integers and 8 decimal places.
TCurrencyField is essentially TFloatField, the only difference is that its field type is ftCurrency.
The precision of TFloatField is 15 digits, and the precision of decimal(20,8) is 20 digits. For example, enter the value 123456789012.12345678 on the client. This value is legal for decimal(20,8) and can be directly entered in the database. But the precision of TFloatField and TCurrencyField is 15 digits. When saving, it will ignore the excess digits and only save 123456789012.123 to the database. I have tested TCurrencyField and TFloatField.
If you manually add fields, you will have Type mismatch for field'' excepting: String actual: BCD. error if the type is defined as String.
If you manually add fields and define the type as Variant, it can be implemented, but it is limited to adding in adoquery. In the 3-layer structure, add a variant type field to adoquery, and then open the DataSet in TClientDataSet or add a field. It will prompt adoquery. The field type of the variant type is undefined. |
|