mdb file still locked after closing the OleDbconnection.

  • Thread starter Thread starter Sagaert Johan
  • Start date Start date
S

Sagaert Johan

Hi

I have a problem with an mdb file still being locked after i closed the
OleDBConnection. (can't rename or delete the file)

Is there anything that still has some open filehandle to the mdb ?


I noticed when i wait a few seconds ( loop containing
Application.Doevents() )
after i called the close methed then ,the mdb file seems to get unlocked..

Are some background oledb processes causing this locking ?

How can i check on this or is there another reason ?

Johan
 
Hi Sagaret,
May be you can try the Handle freeware on Sysinternals.com and store
the output in a text file , it will show which process is still using
it..Hope it helps.
Rakesh
 
Sagaert,

Keep im mind that when something calls close on a file handle the close
request is put in a queue to be processed by the kernel. In other word even
closing a simple file doesn't happen instantly. This is the behaviour of all
modern OS AFAIK.

What I'm trying to say is that you shouldn't rely on the time when a file is
going to be closed, unlocked, etc.
 
Back
Top