Skip to Main Content

Index was outside the bounds of the array. in Managed ODP.NET 19.3

user1111031Jul 22 2021 — edited Jul 22 2021

I'm receiving the following index out of bounds error when using the ODP.NET 19.3 Managed driver:
Index was outside the bounds of the array.
at OracleInternal.ServiceObjects.DataUnmarshaller.StartAccumulatingColumnData(Int32 currentRow, Int32 columnIndex, List`1 rowDataSegments)
at OracleInternal.TTC.Accessors.Accessor.GetInternalDataRef(DataUnmarshaller dataUnmarshaller, Int32 currentRow, Int32 columnIndex, Byte[]& dataByteRep, Int32& dataOffset, Int32& dataLength)
at Oracle.ManagedDataAccess.Client.OracleDataReader.GetDecimal(Int32 i)
at Oracle.ManagedDataAccess.Client.OracleDataReader.GetValue(Int32 i)
at Oracle.ManagedDataAccess.Client.OracleCommand.ExecuteScalar()

My program is running multithreaded with each thread having its own ODP.NET connection and command instances. The threads should not be sharing any ODP.NET resources, yet I still see this error. We're using the .NET Framework version of ODP.NET released with 64-bit ODAC 19.3, not .NET Core.
Does anyone have any experience with this or know of any way to resolve this issue?

This post has been answered by user1111031 on Aug 1 2021
Jump to Answer
Post Details
Added on Jul 22 2021