Problems with FMTBcd fields

Discussion of open issues, suggestions and bugs regarding usage of dbExpress drivers for InterBase & Firebird in Delphi and C++Builder
Post Reply
TronInformatica
Posts: 3
Joined: Mon 11 Feb 2019 15:05

Problems with FMTBcd fields

Post by TronInformatica » Mon 11 Feb 2019 15:12

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)

ViktorV
Devart Team
Posts: 2806
Joined: Wed 30 Jul 2014 07:16

Re: Problems with FMTBcd fields

Post by ViktorV » Tue 12 Feb 2019 09:30

"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.

TronInformatica
Posts: 3
Joined: Mon 11 Feb 2019 15:05

Re: Problems with FMTBcd fields

Post by TronInformatica » Mon 18 Feb 2019 12:46

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.

ViktorV
Devart Team
Posts: 2806
Joined: Wed 30 Jul 2014 07:16

Re: Problems with FMTBcd fields

Post by ViktorV » Tue 19 Feb 2019 15:21

Thank you for the information. We have reproduced the issue and it will be fixed in the next build.

TronInformatica
Posts: 3
Joined: Mon 11 Feb 2019 15:05

Re: Problems with FMTBcd fields

Post by TronInformatica » Wed 20 Feb 2019 13:50

Hi,

Is there a date to this new release??

ViktorV
Devart Team
Posts: 2806
Joined: Wed 30 Jul 2014 07:16

Re: Problems with FMTBcd fields

Post by ViktorV » Wed 20 Feb 2019 15:19

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.

Post Reply