BCD of 8 bytes

Discussion of open issues, suggestions and bugs regarding usage of dbExpress drivers for MySQL in Delphi and C++Builder
Post Reply
mephistofils

BCD of 8 bytes

Post by mephistofils » Wed 27 Apr 2005 13:54

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

Ikar
Posts: 1693
Joined: Thu 28 Oct 2004 13:56

Post by Ikar » Thu 28 Apr 2005 09:22

What is the exact version of the driver that you use?

mephistofils

re

Post by mephistofils » Thu 28 Apr 2005 10:14

version 2.50.0.0

Ikar
Posts: 1693
Joined: Thu 28 Oct 2004 13:56

Post by Ikar » Fri 29 Apr 2005 09:29

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.

mephistofils

Post by mephistofils » Fri 29 Apr 2005 10:05

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 ?

Ikar
Posts: 1693
Joined: Thu 28 Oct 2004 13:56

Post by Ikar » Fri 29 Apr 2005 14:18

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.

Post Reply