OracleDataReader - GetValue method

Discussion of open issues, suggestions and bugs regarding ADO.NET provider for Oracle
Post Reply
jmangelo
Posts: 2
Joined: Mon 25 Feb 2008 11:51

OracleDataReader - GetValue method

Post by jmangelo » Mon 25 Feb 2008 12:04

What is the mapping of Oracle data types to .NET types when the column is a NUMBER.

From what I tested I concluded if the column is NUMBER(1), the OracleDataReader.GetValue() will retrieve it as Int32, and for other NUMBER's will retrieve them as Decimal.

Is there a way to configure the way GetValue() returns the column value?

I want to retrieve the values, when the conversion is possible, as .NET integer types instead of Decimal.

Thks

Alexey.mdr
Posts: 729
Joined: Thu 13 Dec 2007 10:24

Post by Alexey.mdr » Mon 25 Feb 2008 17:10

We return Int32 for NUMBER(1)-NUMBER(9) Oracle types
For larger values we return decimal types.

Post Reply