Access Locking Problem

mafrosis

Well-known member
Joined
Jun 5, 2006
Messages
88
Location
UK
Programming Experience
5-10
Hey all,

Ive unfortunately got to use Microsoft Access for an application at work - we're exporting chunks of data to Access for people to process, and then reimporting them into our SQL Server. This is done by locally duplicating our Access template file, filling it with data, and then copying it to a shared directory on the network.

The problem im having is that I cannot delete the local working Access file because the Jet connection holds a lock on it until my execution finishes. I changed to opening the Jet connection with OleDb in a separate thread, and now the lock doesnt close until this thread ends.

Can I force the thread to end? The thread generates an event which is handled by the Main form thread for a UI update - for some reason my OleDb thread doesnt end until the Main form thread does as well..

Any ideas?
Anything much appreciated

mafro
 
VB.NET:
...Jet connection holds a lock on it until my execution finishes.

which execution do you mean? My Stupid question: why can't you
stop the execution?
 
Ok so my question was a bit stupid - ive been messing with Asynchronous calls yesterday and ive evolved onto a question about that which ill post with some code example later..

Mods feel free to delete this thread if you like!

Ta
 
Back
Top