ODP.NET GetInt32
From: karthick_g <member34149_at_dbforums.com>
Date: Thu, 24 Jul 2003 21:30:54 +0000
Message-ID: <3149740.1059082254_at_dbforums.com>
Date: Thu, 24 Jul 2003 21:30:54 +0000
Message-ID: <3149740.1059082254_at_dbforums.com>
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 Jul 24 2003 - 23:30:54 CEST