Strange "rounding" issue
Posted: Fri 09 Sep 2011 10:44
Hello,
I am using dotConnect for Oracle 5.0.1.0.
I'm having an issue with certain double values, when saving them to the database. For instance, when saving the double 33.36 (through a normal parameterized Oracle command), the value in Oracle after comitting is 33.359999999999992.
I know there is an accuracy aspect to doubles, but it seems odd this happens on the second digit after the separator.
The issue happens on (for instance) 29.36, 30.36, ..., 57.36.
Updating Oracle with these values through a prompt (not using dotconnect) does not have the issue.
Any idea what is causing this?
EDIT: The oracle column data type is an unconstrained NUMBER.
Best regards,
Christian Andersen
I am using dotConnect for Oracle 5.0.1.0.
I'm having an issue with certain double values, when saving them to the database. For instance, when saving the double 33.36 (through a normal parameterized Oracle command), the value in Oracle after comitting is 33.359999999999992.
I know there is an accuracy aspect to doubles, but it seems odd this happens on the second digit after the separator.
The issue happens on (for instance) 29.36, 30.36, ..., 57.36.
Updating Oracle with these values through a prompt (not using dotconnect) does not have the issue.
Any idea what is causing this?
EDIT: The oracle column data type is an unconstrained NUMBER.
Best regards,
Christian Andersen