loosing precision on number - SOLVED

Hello Marco,
i have a number so defined: number(19) and its coprreclty store with value -4321744718369714180

the problem i have is that the same number that i try to get with
QrySelect.FieldAsString('CUST_SID') or with QrySelect.FiledAsEverithing, seems to be truncate with a minor precision, in this case i get '-4,32174471836971E18'
so, as you can see: '-4321744718369714180' is truncated in '-4,32174471836971E18' and '4180' is lost...

This seems, in some way, to be a issue similar to the other i one tried to show you. I think i tried everything and im not able to go over this.

Thank for your help...

Stefano Altissimo
DDWAY srl
 
Last edited:
You can set TOracleSession.Preferences.FloatPrecision:

property FloatPrecision: Integer;
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.
 
Hello Marco,
thank you.

Yes, i have already read the manual and i tried to do everything (i think) around that question setting everything i could in every way.
Can you, please, type for me 2 rows of code? i dont really know what i am missing.
i have to read a number long 19 bytes....

Really thank you.

Stefano Altissimo
DDWAY srl

 
Last edited:
Marco,

i tried to set
DBSt3k.Preferences.FloatPrecision := 19 and higher
because i supposed that it could be a needed non-zero value
and that it didnt work.
I tried with
DBSt3k.Preferences.FloatPrecision := -1 or 1
and i noticed that it works.
Sometimes its hard! :) but thank you for you help.
I hope you can give me something tom solve the other "bug" i told you because it is still blocking a project.
By now this issue seems to be solved.

Grazie

Stefano Altissimo
DDWay srl
 
Back
Top