EnableLargeint Option

Discussion of open issues, suggestions and bugs regarding UniDAC (Universal Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
Posts: 6
Joined: Tue 08 Mar 2005 08:33

EnableLargeint Option

Post by Giannantonio » Mon 16 Apr 2018 14:44

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?

Devart Team
Posts: 1257
Joined: Mon 06 Jul 2015 11:34

Re: EnableLargeint Option

Post by MaximG » Mon 23 Apr 2018 07:09

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:

Code: Select all

UniConnection.SpecificOptions.Values['PrecisionInteger'] := '9';
  UniConnection.SpecificOptions.Values['PrecisionLargeint'] := '0';
  UniConnection.SpecificOptions.Values['PrecisionSmallint'] := '0';

Post Reply