Retrieving Data using a .NET ODBC Application May Fail With: 'Arithmetic operation resulted in an overflow' (Doc ID 1181253.1)

Last updated on MAY 01, 2017

Applies to:

Oracle ODBC Driver - Version 10.2.0.4 to 11.2.0.2 [Release 10.2 to 11.2]
Microsoft Windows x64 (64-bit)
***Checked for relevance on 05-May-2015***

Symptoms

Retrieving data using a .NET ODBC application may fail with:

'Arithmetic operation resulted in an overflow'. This can occur with a call to ExecuteReader on the OdbcCommand object, the fill method of the OdbcDataAdaptor object and others.

For Example, calling ExecuteReader on a OdbcCommand Object Fails With:

Exception Type: system.overflowexception

Error: Arithmetic operation resulted in an overflow.
Source: System.Data
StackTrace:   
   at System.Data.Odbc.OdbcStatementHandle.RowCount(SQLLEN& rowCount)
   at System.Data.Odbc.OdbcDataReader.GetRowCount()
   at System.Data.Odbc.OdbcDataReader.FirstResult()
   at System.Data.Odbc.OdbcCommand.ExecuteReaderObject(CommandBehavior behavior, String method, Boolean needReader, Object[] methodArguments, SQL_API odbcApiMethod)
   at System.Data.Odbc.OdbcCommand.ExecuteReaderObject(CommandBehavior behavior, String method, Boolean needReader)
   at System.Data.Odbc.OdbcCommand.ExecuteReader(CommandBehavior behavior)


Compare the top of the callstack to the following:

at System.Data.Odbc.OdbcStatementHandle.RowCount(SQLLEN& rowCount)
at System.Data.Odbc.OdbcDataReader.GetRowCount()

If they are similar or the same, then you are most likely encountering <Bug 9793452>. Currently, this bug impacts 10.2.0.4.0, 10.2.0.5.0 and 11.2.0.1.0 but not 11.1.0.7.0 as of Patch 32.

  

Changes

Applied a recent patch set to 10.2.0.4.0 or upgraded the Oracle ODBC driver from a previous version to 11.2.0.1.0 on x64.

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