odbcDataAdapter.Fill is throwing SEH Exception

  • Thread starter Thread starter varun22297
  • Start date Start date
V

varun22297

Guest
newOdbcCommand(selectStr, connection.conn);
OdbcDataAdapter odbcDataAdapter = newOdbcDataAdapter(selectStr, connection.conn);
DBWrapper.logger.Debug("{0}-- fetched the connection for query -- {1} -- using {2}", Thread.CurrentThread.Name, selectStr, connection.connName);

// below line is causing SEH Exception

odbcDataAdapter.Fill(dataSet, "data");


I am running three threads parallely each of then uses the above code.

The code is running for certain amount of time like 7 hours. after some time it is throwing SEH Exception. Please help me with the Issue.

Stack Trace:-

General Exception -- System.Runtime.InteropServices.SEHException: External component has thrown an exception.
at System.Data.Common.UnsafeNativeMethods.SQLExecDirectW(OdbcStatementHandle StatementHandle, String StatementText, Int32 TextLength)
at System.Data.Odbc.OdbcStatementHandle.ExecuteDirect(String commandText)
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)
at System.Data.Odbc.OdbcCommand.ExecuteDbDataReader(CommandBehavior behavior)
at System.Data.Common.DbCommand.System.Data.IDbCommand.ExecuteReader(CommandBehavior behavior)
at System.Data.Common.DbDataAdapter.FillInternal(DataSet dataset, DataTable[] datatables, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior)
at System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior)
at System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, String srcTable)
at InstaGateWayBackend.DBWrapper.SelectDataSet(String selectStr)

Continue reading...
 
Back
Top