Unable To Cast Object Of Type 'Oracle.DataAccess.Types.OracleDecimal' To Type 'System.IConvertible'

(Doc ID 1340285.1)

Last updated on JULY 05, 2017

Applies to:

Oracle Data Provider for .NET - Version: to - Release: 10.1 to 11.2
Microsoft Windows (32-bit)


After upgrading an application from .Net 1.x to .Net 2.x or greater, it starts failing with the following error:

System.InvalidCastException: Unable to cast object of type'Oracle.DataAccess.Types.OracleDecimal' to type 'System.IConvertible'.
at System.Convert.ToInt32(Object value)


This was a bug in .Net Framework 1 and fixed in .Net Framework 2 and higher.


Sign In with your My Oracle Support account

Don't have a My Oracle Support account? Click to get started

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms