Issues with uneven number of decimals - trailing zero added automatically

Discussion of open issues, suggestions and bugs regarding ADO.NET provider for Oracle
Post Reply
r_svendsen
Posts: 3
Joined: Fri 03 Aug 2012 08:30

Issues with uneven number of decimals - trailing zero added automatically

Post by r_svendsen » Fri 03 Aug 2012 09:02

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

Pinturiccio
Devart Team
Posts: 2420
Joined: Wed 02 Nov 2011 09:44

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

Post by Pinturiccio » Tue 07 Aug 2012 12:56

We have reproduced the issue. We will investigate it and notify you about the results as soon as possible.

r_svendsen
Posts: 3
Joined: Fri 03 Aug 2012 08:30

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

Post by r_svendsen » Thu 18 Oct 2012 12:37

What are the status of this issue ?

Pinturiccio
Devart Team
Posts: 2420
Joined: Wed 02 Nov 2011 09:44

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

Post by Pinturiccio » Thu 18 Oct 2012 14:07

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)

r_svendsen
Posts: 3
Joined: Fri 03 Aug 2012 08:30

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

Post by r_svendsen » Fri 19 Oct 2012 06:23

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.

Pinturiccio
Devart Team
Posts: 2420
Joined: Wed 02 Nov 2011 09:44

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

Post by Pinturiccio » Fri 19 Oct 2012 10:47

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.

Post Reply