Page 1 of 1

OracleDataReader - GetValue method

Posted: Mon 25 Feb 2008 12:04
by jmangelo
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

Posted: Mon 25 Feb 2008 17:10
by Alexey.mdr
We return Int32 for NUMBER(1)-NUMBER(9) Oracle types
For larger values we return decimal types.