Hi,
After upgrade our project to Delphi 10.3 Rio and dbExpress driver to version 4.10.15.0, we are getting the following error:
Type mismatch for field 'PERPRTCAPSCOEMP', expecting: FMTBcd actual: Float.
At database the field type is NUMERIC(5, 2)
Problems with FMTBcd fields
Re: Problems with FMTBcd fields
"Type mismatch for field 'Field Name' expecting: FMTBcd actual: Float" error means that you have a persistent TFMTBcd field in your dataset but the driver returns the TFloat field.
To solve the problem, please try to set the OptimizedNumerics option to False:
SQLConnection.Params.Values['OptimizedNumerics'] := 'False';
If the OptimizedNumerics option is set to False, regardless of EnableBCD and EnableLargeint options, driver maps all these datatypes to the ftFMTBcd (TFMTBCDField) field type. If the OptimizedNumerics option is set to True, datatypes mapping is described in the table which is located in the Readme.html file at: %DBXInterBase%\Readme.html where %DBXInterBase% is the path to the installed dbExpress driver for InterBase and Firebird.
Also, to solve the problem you can remove the persistent fields.
To solve the problem, please try to set the OptimizedNumerics option to False:
SQLConnection.Params.Values['OptimizedNumerics'] := 'False';
If the OptimizedNumerics option is set to False, regardless of EnableBCD and EnableLargeint options, driver maps all these datatypes to the ftFMTBcd (TFMTBCDField) field type. If the OptimizedNumerics option is set to True, datatypes mapping is described in the table which is located in the Readme.html file at: %DBXInterBase%\Readme.html where %DBXInterBase% is the path to the installed dbExpress driver for InterBase and Firebird.
Also, to solve the problem you can remove the persistent fields.
-
- Posts: 3
- Joined: Mon 11 Feb 2019 15:05
Re: Problems with FMTBcd fields
Hi,
I tried to set SQLConnection.Params.Values['OptimizedNumerics'] to False and I'm still getting the same error and remove the persistent field is not an option to me. What else can I do??
Thanks.
I tried to set SQLConnection.Params.Values['OptimizedNumerics'] to False and I'm still getting the same error and remove the persistent field is not an option to me. What else can I do??
Thanks.
Re: Problems with FMTBcd fields
Thank you for the information. We have reproduced the issue and it will be fixed in the next build.
-
- Posts: 3
- Joined: Mon 11 Feb 2019 15:05
Re: Problems with FMTBcd fields
Hi,
Is there a date to this new release??
Is there a date to this new release??
Re: Problems with FMTBcd fields
At the moment, we do not plan to release the build of dbExpress driver for InterBase and Firebird within a month. However, we can assemble and send a night build with this fix to you. Please send your license number to us using the contact form https://devart.com/company/contactform.html and we will send the night build to you.