Rounding of large numbers

I am testing the limits of my application and found that Direct Oracle Access rounds very large numbers although SQL+ shows them as they were entered (without any rounding).
This is clearly due to the fact the number datatype is converted to a double precision floating point value.
Do you have any suggestions on how to get the large numbers out from the database without rounding ?

Best regards,
Lasse
 
SQLPlus brings everything back as strings and so avoids rounding. The setting to do this for all data in DOA is something like StringFieldsOnly (not positive on that name, you'll have to look it up.) You could also use to_char() on just that field.

-Mark
 
You can alternatively set TOracleSession.Preferences.FloatPrecision:

"Maximum precision to be represented a floating point field (Double). Setting this property to 0 will cause all non-integer numbers to be represented as a floating point field, even though a Double has a maximum precision of 15 digits. Setting it to a non-zero value will cause higher-precision numbers to be represented as a string field. The number will be converted to a string on the server, using the current NLS_LANG settings. This preference affects fields in TOracleQuery and TOracleDataSet components."

------------------
Marco Kalter
Allround Automations
 
Back
Top