Skip to Main Content

ODP.NET

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

From Oracle.ManagedDataAccess.Client internal Exception"Index was outside the bounds of the array"

Anatoly AlymovNov 7 2018 — edited Jan 31 2019

Hi.

I found a problem like in this discussion: https://community.oracle.com/message/13925878#13925878

I use Oracle.ManagedDataAccess.Dll Version: 4.122.18.3:20180526

  1. cmd.CommandText = @"select 1 id from dual@test.test.test";
  2. OracleDataAdapter adapter = new OracleDataAdapter(cmd);
  3. DataTable dt = new DataTable();
  4. adapter.Fill(dt);

In query I use a db_link with 2  dots.

When execute adapter.Fill(dt)  I get error: internal Exception"Index was outside the bounds of the array"

Stack Trace:

   at OracleInternal.ServiceObjects.SQLParser.SqlSplitStrings(String inStr, SqlMicTokTyp Flag, String& outStr1, String& outStr2, String& outStr3)

   at OracleInternal.ServiceObjects.SQLParser.SqlPopulateTableSchemaInfo(SQLLocalParsePrimaryKeyInfo& sqlParseInfo, List`1 tableList)

   at OracleInternal.ServiceObjects.SQLParser.SqlLocalBuildEx(OracleConnectionImpl connImpl, SQLMetaData sqlMetaData, List`1 tableList, UInt32 numberOfTables, List`1 sqlTokList, Boolean onlyWildcard, UInt32 noOfpMeta, Boolean metadataHasImplicitROWIDColumn, Boolean parseFailed)

   at OracleInternal.ServiceObjects.SQLParser.GetSchemaMetaData(SQLMetaData sqlMetInfo, OracleConnection conn, OracleConnectionImpl connImpl, Boolean metadataHasImplicitROWIDColumn)

   at Oracle.ManagedDataAccess.Client.OracleDataReader.PopulateMetaData(Boolean tryGetPKInfo)

   at Oracle.ManagedDataAccess.Client.OracleDataReader.GetMinSchemaTable()

   at Oracle.ManagedDataAccess.Client.OracleDataReader.set_IsFillReader(Boolean value)

   at Oracle.ManagedDataAccess.Client.OracleDataAdapter.Fill(DataTable[] dataTables, Int32 startRecord, Int32 maxRecords, IDbCommand command, CommandBehavior behavior)

   at System.Data.Common.DbDataAdapter.Fill(DataTable dataTable)

   at TestOracleConnectionPool.Form1.button8_Click(Object sender, EventArgs e) in C:\Users\a.alymov\Documents\Visual Studio 2017\Projects\TestOracleConnectionPool\TestOracleConnectionPool\Form1.cs:line 141

   at System.Windows.Forms.Control.OnClick(EventArgs e)

   at System.Windows.Forms.Button.OnClick(EventArgs e)

   at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)

   at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)

   at System.Windows.Forms.Control.WndProc(Message& m)

   at System.Windows.Forms.ButtonBase.WndProc(Message& m)

   at System.Windows.Forms.Button.WndProc(Message& m)

   at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

   at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)

   at System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(IntPtr dwComponentID, Int32 reason, Int32 pvLoopData)

   at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)

   at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)

...

Comments
Post Details
Added on Nov 7 2018
3 comments
1,861 views