[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

microsoft.public.dotnet.framework.odbcnet

Access Lock remains after connection closed

mithridates

7/7/2006 12:40:00 PM

I am using a non-pooled OLE DB connection to add records to an access
database. The database is an empty template database that is copied to
the running application directory for a set of objects. For each
objects a set of records are saved to the database, the database is
stored elsewhere, and the clean template file is copied over the
database in the application directory.

I have been having random problems with corruption in this database and
have been trying to track down the issue. In all of the databases that
have been corrupt I have found records belonging to the object that was
processed previously. This has led me to believe that the copy
operation may not be completing or something is remaining in memory
that is making access think it still has the records from the file that
was overwritten.

I have double and triple checked that the connection is being closed
and have had other developers confirm that everything seems to be
working as it is supposed to. I am checking that the connection state
is open, closing and then disposing of the connection. However; the
lock file is remaining after this has happened and remains still after
the file is overwritten by the template to create a clean copy for the
next object to be processed.

I have used the LDB Viewer and confirmed that for each object that is
processed, a user is showing up as accessing the database.

I have tried explicitly turning off connection pooling by adding "OLE
DB Services=-4;" to my connection string, but ths did not solve the
problem. I am open to any suggestions. Thank you for any help that
can be offered.

-Mike