Re: ODP.NET GetInt32
Date: Thu, 04 Sep 2003 02:18:39 -0400
Message-ID: <3328478.1062656319_at_dbforums.com>
Hi,
you are probably out of luck - the oracle providers available always will return NUMBER-columns
using System.Decimal type.
Obviously neither Microsoft nor Oracle are interested in providing portable database access
via generic System.Data interfaces...
Greetings,
Klaus
Originally posted by karthick_g
> I have successfully executed an SQL statement & the result is in
> OracleDataReader rd.
> It holds 1 record with 4 columns. The 3rd column is of datatype
> NUMBER.
> I can get the data out of the other columns with no problem, but the
> integer value gives this exception.
> The code is:
> if(iobjDataReader.IsDBNull(2))
> return System.Int32.MinValue;
> else
> return iobjDataReader.GetInt32(nIndex);
>
> The exception is:
> System.InvalidCastException
>
> How do I take care of this?
>
> Thank you,
G. Karthikeyan
-- Posted via http://dbforums.comReceived on Thu Sep 04 2003 - 08:18:39 CEST