Double padded with extra decimal places
Posted: Wed 19 Aug 2015 19:35
- - Urgent need for a solution - -
I'm using Oracle DBConnect version 8.4.274.6 with entity framework 6 against an Oracle 11g database. I have column in a table defined as number (12,2). If that data in the column a value to the right of the decimal point of 33 (e.g. 200000.33) and the whole number portion is a number >=131,099 and < 262150, then the value in the column's property on the domain object is padded with additional numbers e.g. 131099.33000000002.
If the number has a decimal value other than .33, this padding does not happen. e.g. 131099.34, does not have this issue. I have been able to reproduce this consistently. To reproduce, use a table with a column defined as number (12,2), us an app with the versions listed above. Select a row into a domain object for the table and break point on the column. You will see the padding if the numbers are in the range. Use 111.33 (for example) no problem. Interestingly, a ToString() on the property only returns 2 decimal places. But copying the property with no transformation to another double variable keeps on the decimal points. I have test this with updating the data in the database outside the app with SQL Navigator. Inside the app, etc.
Need a fix as soon as possible (or a viable workaround).
I'm using Oracle DBConnect version 8.4.274.6 with entity framework 6 against an Oracle 11g database. I have column in a table defined as number (12,2). If that data in the column a value to the right of the decimal point of 33 (e.g. 200000.33) and the whole number portion is a number >=131,099 and < 262150, then the value in the column's property on the domain object is padded with additional numbers e.g. 131099.33000000002.
If the number has a decimal value other than .33, this padding does not happen. e.g. 131099.34, does not have this issue. I have been able to reproduce this consistently. To reproduce, use a table with a column defined as number (12,2), us an app with the versions listed above. Select a row into a domain object for the table and break point on the column. You will see the padding if the numbers are in the range. Use 111.33 (for example) no problem. Interestingly, a ToString() on the property only returns 2 decimal places. But copying the property with no transformation to another double variable keeps on the decimal points. I have test this with updating the data in the database outside the app with SQL Navigator. Inside the app, etc.
Need a fix as soon as possible (or a viable workaround).