Reading a VARRAY causes an exception
Posted: Sat 20 Nov 2004 13:56
I am using V2.40 of OraDirect .NET.
I have some code which reads rows from a table where some of the columns are embedded VARRAY(3) OF NUMBER.
Things all work fine until I read in a row where one of these numbers in the VARRAY is
-6.046E-17
Then I get:
System.ArgumentOutOfRangeException
Specified argument was out of the range of valid values.
I get a similar erorr if I do some (more convoluted) code in Oracle's ODP.Net to read in the value.
What gives? I know that numbers close to zero sometimes get slightly altered to to the inaccurate way of storing decimals in binary representation, but I figured that being a generic number would prevent this issue.
I had this issue near the beginning of the year and was informed by Core Labs that there would be a solution in the next release.
Well, I moved on to other projects so left it alone until now; there has been at least one release of OraDirect .NET since then but the issue does not seem resolved...
Any ideas on a work-around or solution? I cannot really change the underlying data in the Oracle database as it is derived from a source which is oiut of my control.
Thanks in advance,
Paul.
PS: Of course, my client now wants an immediate solution!
I have some code which reads rows from a table where some of the columns are embedded VARRAY(3) OF NUMBER.
Things all work fine until I read in a row where one of these numbers in the VARRAY is
-6.046E-17
Then I get:
System.ArgumentOutOfRangeException
Specified argument was out of the range of valid values.
I get a similar erorr if I do some (more convoluted) code in Oracle's ODP.Net to read in the value.
What gives? I know that numbers close to zero sometimes get slightly altered to to the inaccurate way of storing decimals in binary representation, but I figured that being a generic number would prevent this issue.
I had this issue near the beginning of the year and was informed by Core Labs that there would be a solution in the next release.
Well, I moved on to other projects so left it alone until now; there has been at least one release of OraDirect .NET since then but the issue does not seem resolved...
Any ideas on a work-around or solution? I cannot really change the underlying data in the Oracle database as it is derived from a source which is oiut of my control.
Thanks in advance,
Paul.
PS: Of course, my client now wants an immediate solution!