Version incompatible dbexpmda.dll (BCD-FMTBcdField)
-
- Posts: 4
- Joined: Fri 23 Apr 2010 18:08
Version incompatible dbexpmda.dll (BCD-FMTBcdField)
Hello
I have an application developed in Delphi 7 using an MySQL database and 4.0 driver dbexpmda.dll (Version 2.50.0.0).
Use as a connection object TSQLConnection.
I'm doing the migration to MySQL 5.1 using dbexpmda.dll driver (version 4.50.0.22).
In the driver version 2.50.0.0 for the return type was decimal BCD, and after updating to version 4.50.0.22 driver is being returned to the type FMTBcdField
Error: TClientDataSet: Type mismatch for field 'FieldName', expecting: BCD current: FMTBcdField
How should I set so that the driver performs the conversion automatically?
It is totally impractical to use all ClientDataSet the application performing the treatment.
I have an application developed in Delphi 7 using an MySQL database and 4.0 driver dbexpmda.dll (Version 2.50.0.0).
Use as a connection object TSQLConnection.
I'm doing the migration to MySQL 5.1 using dbexpmda.dll driver (version 4.50.0.22).
In the driver version 2.50.0.0 for the return type was decimal BCD, and after updating to version 4.50.0.22 driver is being returned to the type FMTBcdField
Error: TClientDataSet: Type mismatch for field 'FieldName', expecting: BCD current: FMTBcdField
How should I set so that the driver performs the conversion automatically?
It is totally impractical to use all ClientDataSet the application performing the treatment.
-
- Posts: 4
- Joined: Fri 23 Apr 2010 18:08
Type on MySQL
Field mapped with TBCDField is decimal type on MySQL 4.0Dimon wrote:Please specify the MySQL type mapped to TBCDField.
-
- Posts: 4
- Joined: Fri 23 Apr 2010 18:08
Structure of table and MySQL version
Ok, but i have one doubt, maybe I'm doing wrong.Dimon wrote:I can not reproduce the problem.
Decimal MySQL type is mapped to TBCDField.
Please send me a script to create table to dmitryg*devart*com. Also specify the exact version of MySQL server.
Is necessary add the fields again in the ClientDataSet?
I'm not doing this, I'm only replacing the dbexpmda.dll arquive
-- Answer of last question :
New Version: MySQL 5.1.45-community
Old Version: MySQL 4.0.24-standard-log
Old Version: MySQL 4.1.22-community-nt
Independent of version MySQL used, the error is presented by the driver dbexpmda.dll.
Script of Create Table:
create table PRODUTO
(
PRD_CODIGO int not null,
PRD_DESCRICAO CHAR(40) not null,
PRD_ESPECIEVOLUME CHAR(20) not null,
PRD_SEGUROACIDENTE decimal(6,3),
PRD_SEGURODESCONTO decimal(6,3),
PRD_SEGUROROUBO decimal(6,3),
PRD_SEGUROFIXO decimal(14,2),
PRD_ICMSPAUTA char(1),
PRD_PARACOBRANCAACESSORIA char(1),
PRD_SEGUROSINISTRO decimal(6,3),
PRD_VALORMAXIMOBASESEGURO decimal(14,2),
PRD_TIPOITEM char(4)
);
Thank you for the information.
This behaviour change is caused by problems, that occurs with MySQL Server version 4. The point is that MySQL versions 4 and 5 process DECIMAL fields differently, and changes were done for compatibility.
To solve the problem you should recreate fields in ClientDataSet.
This behaviour change is caused by problems, that occurs with MySQL Server version 4. The point is that MySQL versions 4 and 5 process DECIMAL fields differently, and changes were done for compatibility.
To solve the problem you should recreate fields in ClientDataSet.
-
- Posts: 4
- Joined: Fri 23 Apr 2010 18:08
Thank you.Dimon wrote:Thank you for the information.
This behaviour change is caused by problems, that occurs with MySQL Server version 4. The point is that MySQL versions 4 and 5 process DECIMAL fields differently, and changes were done for compatibility.
To solve the problem you should recreate fields in ClientDataSet.
I'll do some testing, probably will perform a conversion function at runtime for the Fields.
If I get hit, make available to my solution.