Read values Int32 in Oracle Database
693742Mar 31 2009 — edited Apr 2 2009Hello 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.