ADO.NET TableAdapter "The connection is closed" error

F

foolmelon

It happens occasionally and randomly. We have a simple TableAdapter
retrieving a row from an Oracle table based on the table's primary
key. The TableAdapter was generated by Visual Studio 2005
TableAdapter Query Configuration Wizard by choosing "Use SQL
statements" and "SELECT which return rows" options. In the Wizard
"Return a DataTable" was checked, but not "Fill a DataTable". From
time to time, this select call throws following exception at runtime
and it is not reproducable:

System.InvalidOperationException: Invalid operation. The connection is
closed. at
System.Data.OracleClient.OracleConnection.GetOpenInternalConnection()
at System.Data.OracleClient.OracleConnection.get_ErrorHandle() at
System.Data.OracleClient.OracleDataReader.ReadInternal() at
System.Data.OracleClient.OracleDataReader.Read() at
System.Data.Common.DataAdapter.FillLoadDataRow(SchemaMapping mapping)
at System.Data.Common.DataAdapter.FillFromReader(DataSet dataset,
DataTable datatable, String srcTable, DataReaderContainer dataReader,
Int32 startRecord, Int32 maxRecords, DataColumn parentChapterColumn,
Object parentChapterValue) at
System.Data.Common.DataAdapter.Fill(DataTable[] dataTables,
IDataReader dataReader, Int32 startRecord, Int32 maxRecords) 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(DataTable[] dataTables, Int32
startRecord, Int32 maxRecords, IDbCommand command, CommandBehavior
behavior) at System.Data.Common.DbDataAdapter.Fill(DataTable
dataTable) at MyTableAdapters.MyTableAdapter.GetMyRowByMyId(Decimal
MyPrimaryId) in C:\WINDOWS\Microsoft.NET\Framework
\v2.0.50727\Temporary ASP.NET Files\onlineadjtest
\bd99d578\e38f24c2\App_Code.enwl9zb0.48.vb:line 1278 ...... etc.


We have following environment:

Windows Server 2003 Standard Edition with SP1
..NET Framework 2.0.50727
Oracle Client 9.2.01
Oracle Server - Oracle 8i Enterprise Edition Release 8.1.7.4.0

Any suggestions will be appreciated.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top