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: 10.1.0.2 to 11.2.0.2 - Release: 10.1 to 11.2
Microsoft Windows (32-bit)

Symptoms

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)

Changes

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

Cause

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