Skip to Main Content

Oracle Database Discussions

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Read values Int32 in Oracle Database

693742Mar 31 2009 — edited Apr 2 2009
Hello everybody,

We have an existing .NET (C#) program reading integer values in SQLServer 2005 database and wish to adapt to use Oracle 11g without rewriting the whole application.

We get an exception (cast problem) when reading Int32 in Oracle Database because Oracle native type is "number" and return a decimal value

We use ADO.NET throw System.Data.SQLClient and System.Data.OracleClient but the DataReader used from System.Data.Common.DbDataReader is common to the two database systems.

Is there a solution avoiding to change all the GetInt32… used everywhere by System.Convert.ToInt32(GetValue…. to read our integer values?

Thank you for any suggestions.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Apr 30 2009
Added on Mar 31 2009
3 comments
1,272 views