I upgraded an old .net 2.0 application using System.Data.Sqlite v 1.0.60.0
to .net 4.5 using system.data.sqlite v 1.0.96.0.  The application started
getting random exceptions when access the database using datsets.  See
below:



System.ApplicationException: Cannot access a disposed object.

Object name: 'SQLiteConnection'. ---> System.ObjectDisposedException: Cannot
access a disposed object.

Object name: 'SQLiteConnection'.

   at System.Data.SQLite.SQLiteConnection.CheckDisposed()

   at System.Data.SQLite.SQLiteConnection.get_State()

   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
HomeInspect.DataSchema.InspectionTemplateDSTableAdapters.INSPECTION_TEMPLATE
STableAdapter.Fill(INSPECTION_TEMPLATESDataTable dataTable) in
d:\Projects\Interspect2013\src\HomeInspect.DataSchema\InspectionTemplateDS.D
esigner.cs:line 10398



Why is the connection getting disposed.  Do I need to recreate all of my
dataset objects?  The same code running on .net 2 with the 1.0.60.0 does not
exhibit this problem.  I am trying to isolate where this problem exists.
The only thing I have been able to find was related to the database
remaining locked because dispose was not being called.  



Thank you,



Steve





---
This email has been checked for viruses by Avast antivirus software.
http://www.avast.com

Reply via email to