Problem reading values from number columns with high scale

Problem reading values from number columns with high scale

Postby bejby7 » Tue 24 Jan 2006 10:10

I create a table and inserts values according to this script :

CREATE TABLE TJOTR
(
N NUMBER,
V VARCHAR2(10 BYTE)
)

INSERT INTO TJOTR (
N, V)
VALUES ( 0.00632958471747583928374627378, 'FUN' )

The number inserted has 29 decimals.
When I try to fill (select * from tjotr) an oracleDatatable or a dataset with oracleDataAdapter I get the following error:

Specified argument was out of the range of valid values.
Parameter name: Decimal's scale value must be between 0 and 28, inclusive.

Default scale for number columns I think is 38 in oracle. If I understand this problem right the scale can only be 28 for a number column to be able to read the data. We can't redefine all number columns in an external datawarehouse to be able to read the values.

Bug? Clues? Hints? Suggestions?
bejby7
 
Posts: 7
Joined: Thu 15 Sep 2005 08:10

Postby Paul » Wed 25 Jan 2006 09:34

OraDirect .NET fetches NUMBER type as Decimal .NET type. This behaviour is compatible with Microsoft and Oracle data providers.
The maximum precision of Decimal is 28.
Paul
 
Posts: 725
Joined: Thu 28 Oct 2004 14:06

Postby Alladin » Wed 15 Aug 2007 15:23

The maximum precision of Decimal is 28.

This is known fact, but question is still waiting for an answer.

How to read numeric values using your implementation of IDataReader without following problems:
1) modifying underlying database.
2) modifying selects.
3) getting exceptions.
Alladin
 
Posts: 149
Joined: Mon 27 Nov 2006 16:18

Postby Alexey » Wed 15 Aug 2007 15:56

The fix is in OraDirect .NET 4.20.
Alexey
 
Posts: 2756
Joined: Mon 13 Mar 2006 07:43

Postby Alladin » Thu 16 Aug 2007 14:38

Can we have this bugfix not only in unstable beta version, but also in 3.55 branch?
Alladin
 
Posts: 149
Joined: Mon 27 Nov 2006 16:18

Postby Alexey » Thu 16 Aug 2007 15:49

OK, we will do this for you.
Alexey
 
Posts: 2756
Joined: Mon 13 Mar 2006 07:43

Postby Alladin » Thu 16 Aug 2007 16:06

We definitely consider upgrade to version 4.20 when it will be released because of performance improvements and other stuff.

But as for today actual 4.20 version is not stable enought (some of my tests fail). The one error I can remember is NullReferenceException during some DDL queries.

But to be honest, I can't say we tested 4.20 a lot. When we got this exception, the only solution was to return to 3.55.23 which is at this moment in our production environment and considered more-or-less stable (except for some hard-to-submit errors with memory corruption on vista+instant client machines)...
Alladin
 
Posts: 149
Joined: Mon 27 Nov 2006 16:18

Postby Alexey » Fri 17 Aug 2007 06:51

If you are going to upgrade to 4.20, then there is no need in providing you 3.55, because we will not be able to issue it in the near future.
This would be better if you inform us all the problems that you encountered with 4.20, so that we could fix them.
Alexey
 
Posts: 2756
Joined: Mon 13 Mar 2006 07:43

Postby Alladin » Fri 17 Aug 2007 19:10

We'll upgrade to 4.20 when it will be officially released.

Generally, we do not beta test third-party products due to lack of our time. And we are not allowed to use beta versions to minimize problem field of our own beta software.

(When I made a test run with 4.20 was my private initiative)

But generally speaking, complete lost of some numeric field values is a serious problem which I cannot explain to our customers.

Code: Select all
        while (reader.Read())
        {
          object[] record = result.Add();

          try
          {
            reader.GetValues(record);
          }
          catch
          {
            FillSlow(reader, record);
          }
        }

    private void FillSlow(IDataReader reader, object[] record)
    {
      for (int i = 0; i < reader.FieldCount; i++)
        try
        {
          record[i] = reader.GetValue(i);
        }
        catch
        {
          record[i] = DBNull.Value;
        }
    }
Alladin
 
Posts: 149
Joined: Mon 27 Nov 2006 16:18

Postby Alexey » Tue 21 Aug 2007 08:34

If you are not able to provide me with full code right now, I think the best way is wait until 4.20 version is released and then raise this request again.
Alexey
 
Posts: 2756
Joined: Mon 13 Mar 2006 07:43

Postby Alexey » Mon 29 Oct 2007 07:28

Alexey wrote:OK, we will do this for you.

OraDirect .NET 3.55.25 is available for download now!
Alexey
 
Posts: 2756
Joined: Mon 13 Mar 2006 07:43


Return to dotConnect for Oracle