-4.6 returns as -4.6000000000000005
Posted: Thu 25 Mar 2010 20:29
We have encountered a very strange error with dotconnect. When retrieving -4.6 from the database it actually returns -4.6000000000000005 of type Double. Obviously there's some miscalculation taking place.
So far -4.6 is the magic number; no others found. This happens when using a dataContext/LINQ to Oracle and when just using a devart.data.oracle.oracleCommand object. The DataContext designer defaulted our field to type Double? instead of type Decimal, so we just left it that way.
dotConnect version: 5.35.79pro
oracle version: 10g
database field type: NUMBER, length 11, scale 2, nullable
Thanks,
Zach
So far -4.6 is the magic number; no others found. This happens when using a dataContext/LINQ to Oracle and when just using a devart.data.oracle.oracleCommand object. The DataContext designer defaulted our field to type Double? instead of type Decimal, so we just left it that way.
dotConnect version: 5.35.79pro
oracle version: 10g
database field type: NUMBER, length 11, scale 2, nullable
Thanks,
Zach