I am porting an application from Odac to UniDAC.
With Odac, and the EnableLargeint option of TOraSession not active (default), for a field defined as Number(12) a TFloatField is correctly created, instead with UniDAC, Oracle Provider and always with the EnableLargeint option of TUniConnection equal to False (default), a TLargeintField is instead created. Is this a bug? What options do I have to put in TUniConnection to not have TLargeintField?
EnableLargeint Option
Re: EnableLargeint Option
The difference in the behavior of ODAC and UniDAC is not a bug. This implementation has been present in UniDAC for a long time. We cannot change the default settings in order to NUMBER(12) fields to be created in UniDAC with the same type as in ODAC. This will mean changing the behavior for our many users. However, it is quite simple to impment your behavior. There are 2 ways for this:
- using DataTypeMapping : devart.com/unidac/docs/data_type_mapping.htm
- using the 'PrecisionSmallint', 'PrecisionInteger', 'PrecisionLargeint' options.
For the exact correspondence with ODAC, set the following values for these options:
- using DataTypeMapping : devart.com/unidac/docs/data_type_mapping.htm
- using the 'PrecisionSmallint', 'PrecisionInteger', 'PrecisionLargeint' options.
For the exact correspondence with ODAC, set the following values for these options:
Code: Select all
UniConnection.SpecificOptions.Values['PrecisionInteger'] := '9';
UniConnection.SpecificOptions.Values['PrecisionLargeint'] := '0';
UniConnection.SpecificOptions.Values['PrecisionSmallint'] := '0';