Ensure that your TClientDataSet
field is explicitly created as ftLargeint
otherwise you may have such rounding issues.
Forget about using ADO for accessing Oracle. Note that all OleDB providers interfaced by ADO are buggy for handling BLOBs: Microsoft's version just do not handle them, and Oracle's version will randomly return null for 1/4 of rows... I won't be surprised if similar issues occur in your case, about numerical fields.
You may take a look at other mean to access Oracle, like the DBExpresss driver or even the BDE. Some third-party components are available also.
Our free direct access classes to Oracle handles such numerical fields natively, and will handle Int64 values directly, with no TDataSet
conversion (which may also be the cause of the issue). For instance, I think it is the only Delphi unit implementing the latest 11g feature named "64-bit Integer Host Datatype for OCI Bind and Define calls". It requires no client driver (nor BDE, nor Provider, nor local configuration): you can connect directly to Oracle just by copying the Oracle Instance Client dll with your Delphi exe. Resulting speed is amazing.