Page 1 of 1
BCD of 8 bytes
Posted: Wed 27 Apr 2005 13:54
by mephistofils
good day,
Using:
Delphi 7
MySQL 4.1.11
The BCD (decimal(m,d) ) column size is m+2 bytes (from MySQL Reference Manual) but when Delphi fetch the column, he sees 8 bytes at first, fill them and then, raise an overflow error...
Is your driver giving wrong size informations to Delphi ?
thanks
Posted: Thu 28 Apr 2005 09:22
by Ikar
What is the exact version of the driver that you use?
re
Posted: Thu 28 Apr 2005 10:14
by mephistofils
version 2.50.0.0
Posted: Fri 29 Apr 2005 09:29
by Ikar
What values of m and d do you use? Please send a script to create and fill the table.
Also specify the version from history.html file.
Posted: Fri 29 Apr 2005 10:05
by mephistofils
from history.html:
version 2.50.4 29-Mar-05
I use decimal(19,4) -> the size of the record is 21 bytes, like a string
Delphi get it as a TFMTBCDField with precision=21 and size=4 and wants to store it in 8 bytes, like a number
the application works correctly when the database is empty
I don't know about the conversion between them but the values that we save are correctly interpreted, it would be strange that it doesn't work the other way so what could it be ?
Posted: Fri 29 Apr 2005 14:18
by Ikar
We manage to work with numbers of this type without any problem.
Please send us complete small sample to demonstrate the problem and include script to create and fill table.