Page 1 of 1

Wrong Fieldtype

Posted: Tue 10 Dec 2013 11:39
by MarioM
I'm evaluating if buying your Driver dbexpmda.dll, downloaded three days ago. I'm using it with Mysql 4.0.13 and Delphi 7.0 Build 8.1. I get the error message
"Type mismatch for field 'xyz', expecting: FMTBcdField actual: BCD" for
Fields of type DECIMAL(8,2). It returns the wrong Fieldtype. I've seen a similar problem in your forum dated august 2013(but with different version both of Mysql and Delphi) and in the answers you say that it will be patched presumibly in October (2013), have you solved the problem? Do you have a patch I can use?.

Re: Wrong Fieldtype

Posted: Tue 10 Dec 2013 12:07
by AndreyZ
I have checked this question using the latest dbExpress driver for MySQL version 6.3.4 , Delphi 7 Build 8.1 , and MySQL 4.0.21. For DECIMAL(8,2) columns, dbExpress driver for MySQL correctly creates TFMTBCDField fields.

Re: Wrong Fieldtype

Posted: Wed 11 Dec 2013 16:06
by MarioM
I have only changed in a pre-existent procedure the TSQLConnection drivername to DevartMySQL (LibraryName dbexpmda.dll) instead of the default MYSQL (dbexpmysql.dll) and I received the message about the wrong fieldtype when opening the TSQLdataset, connected to the TSQLConnection, with fields formerly defined. If the Fieldtype DevartMysql gives is right, does it mean that pre-existent Delphi default was wrong?

Re: Wrong Fieldtype

Posted: Thu 12 Dec 2013 07:51
by AndreyZ
The "Type mismatch for field 'xyz', expecting: FMTBcdField actual: BCD" error means that you have a persistent TFMTBCDField field in your dataset but driver returns TBCDField field. For DECIMAL(8,2) columns, dbExpress driver for MySQL creates TFMTBCDField fields. It means that using the latest dbExpress driver for MySQL you will not encounter this error, as driver returns exactly the field type that is expected by your dataset.

Re: Wrong Fieldtype

Posted: Fri 13 Dec 2013 21:27
by MarioM
Thank you for the information, I'm going to recharge all fields related to decimal fields in the field definitions of ClientDataSet and SQLDataSet after changing the connection to Devart, and to change all assignment to currency variable specifing :=ClientDataSetFieldName.AsCurrency instead of :=ClientDataSetFieldName.Value.

Re: Wrong Fieldtype

Posted: Mon 16 Dec 2013 09:50
by AndreyZ
You are welcome. If any other questions come up, please contact us.