Hi all,
So I was reading in the Web docs about the BCD field and FMTBCD Field and some things aren't exactly clear to me.
I have a Field defined in a Firebird database that is:
LTAVLRTOTAL DECIMAL(14,4) DEFAULT 0
and when I open the Fields Editor and add the fields in a TUniQuery, it shows up as FloatField if I have the EnableBCD = True, and if I have the EnableFMTBCD = True it shows up as a FMTBCDField.
As in the Docs at
http://www.devart.com/unidac/docs/index ... _types.htm
shows that
ftBCD -> DECIMAL(p, s) where (p < 15) and (s < 5)
ftFMTBCD -> DECIMAL(p, s) where (14 < p < 19) and(4 < s < 19)
Shouldn't the field showed up as a BCDField?
My doubt, Can I use the FMTBCDField without any problems? Willl this behaviour change in the next versions? is there any significant diference? (I believe not, but better ask now than being sorry later).
I am working with a lot a money operations and the BCDfield has always been the type that I used.
Using XE3 and Unidac 5.3.8 with Firebird 2.53
Just another thing, will the currency property at the field level make any diference?
Thanks
Andrew
BCD fields and FMTBCD fields
Re: BCD fields and FMTBCD fields
Thank you for the information. We have fixed the error with incorrect DECIMAL fields mapping in UniDAC.
We have added the "SimpleNumericMap" connection specific option for InterBase provider. You should set the option to "False" to force fields like DECIMAL(14, 4) be mapped as ftBCD when EnableBCD is True. The default option value is "True".
The fix will be included in the nearest UniDAC build. We plan to release the build this week.
We have added the "SimpleNumericMap" connection specific option for InterBase provider. You should set the option to "False" to force fields like DECIMAL(14, 4) be mapped as ftBCD when EnableBCD is True. The default option value is "True".
The fix will be included in the nearest UniDAC build. We plan to release the build this week.
-
- Posts: 12
- Joined: Fri 04 Apr 2014 18:50
Re: BCD fields and FMTBCD fields
Ok, good to know that I can help with something.
In the meantime, is there a workaround other than setting all the desired fields to BCD fields with the DataMapper?
Thanks
Andrew
In the meantime, is there a workaround other than setting all the desired fields to BCD fields with the DataMapper?
Thanks
Andrew
Re: BCD fields and FMTBCD fields
For now, in UniDAC all fields are mapped either as TFloatField or as TFmtBcdField, depending on the EnableFMTBCD option value. You can use Data Type Mapping as a workaround unless we release the UniDAC build.
Re: BCD fields and FMTBCD fields
Hi,
We also need seperation for BCD and FMTBCD fields in Data Mapping for Decimal fields on Database Informix ODBC driver. We can not seperate it. Is there any idea?
We also need seperation for BCD and FMTBCD fields in Data Mapping for Decimal fields on Database Informix ODBC driver. We can not seperate it. Is there any idea?
Re: BCD fields and FMTBCD fields
The properties you mention are obsolete and are present in our components only for backward compatibility. Currently, you can use DataTypeMapping -
special mechanism provided by our components. It allows you customizing the type conversion in the most flexible way, for example:
The detailed description of this mechanism processing can be found in our documentation: https://www.devart.com/unidac/docs/data ... pping.htm
special mechanism provided by our components. It allows you customizing the type conversion in the most flexible way, for example:
Code: Select all
uses ODBCDataTypeMapUni;
...
UniQuery.DataTypeMap.AddDBTypeRule(odbcDecimal, ftBCD);