Page 1 of 1

Issues with uneven number of decimals - trailing zero added automatically

Posted: Fri 03 Aug 2012 09:02
by r_svendsen
When I receive decimal number from Oracle there will be added a trailing 0 (zero) to the number, if the number has an uneven number of decimals.

Example:

Value In DB : Value In Code
123.123 -> 123.1230
123.12345 -> 123.123450

If there are even number of decimals, the value is right.
123.12 -> 123.12
123.1234 -> 123.1234

Oracle DbType = "NUMBER NULL"

DLL versions:
Devart.Data.Oracle.dll 6.70.293.0
Devart.Data.Oracle.Linq.dll 3.1.25.0

Re: Issues with uneven number of decimals - trailing zero added automatically

Posted: Tue 07 Aug 2012 12:56
by Pinturiccio
We have reproduced the issue. We will investigate it and notify you about the results as soon as possible.

Re: Issues with uneven number of decimals - trailing zero added automatically

Posted: Thu 18 Oct 2012 12:37
by r_svendsen
What are the status of this issue ?

Re: Issues with uneven number of decimals - trailing zero added automatically

Posted: Thu 18 Oct 2012 14:07
by Pinturiccio
This is a designed behaviour. We convert the Oracle NUMBER data type to the .NET Framework Decimal type correctly.
Also this behaviour is present in other ADO.NET providers such as Microsoft OracleClient (System.Data.OracleClient) and ODP.NET (Oracle.DataAccess.dll)

Re: Issues with uneven number of decimals - trailing zero added automatically

Posted: Fri 19 Oct 2012 06:23
by r_svendsen
It seems that Microsoft has fixed the bug in their driver many years ago: http://support.microsoft.com/kb/244554

But it still exists in Devart Code.

Re: Issues with uneven number of decimals - trailing zero added automatically

Posted: Fri 19 Oct 2012 10:47
by Pinturiccio
In the reference you have provided, it is said that the issue has been resolved with the Microsoft Oracle ODBC driver. But dotConnect for Oracle is not a ODBC provider. dotConnect for Oracle is a ADO.NET provider.

Microsoft has solved this issue for the ODBC driver, but not for ADO.NET Oracle provider. According to the article you refer to, the last reply is dated October 12, 2005. But the issue persists in System.Data.OracleClient 4.0.0.0 that was released in 2010.

So this is a designed behaviour for ADO.NET providers.