471,603 Members | 1,746 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,603 software developers and data experts.

mdb file still locked after closing the OleDbconnection.

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


Dec 5 '05 #1
2 2828
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

Dec 5 '05 #2
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.
--

Stoitcho Goutsev (100) [C# MVP]

"Sagaert Johan" <RE*************@hotmail.com> wrote in message
news:ul****************@TK2MSFTNGP09.phx.gbl...
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

Dec 5 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

4 posts views Thread by Albert Greinöcker | last post: by
4 posts views Thread by hkappleorange | last post: by
3 posts views Thread by thebhone | last post: by
1 post views Thread by veeves | last post: by
5 posts views Thread by buu | last post: by
reply views Thread by Dmitry Teslenko | last post: by
reply views Thread by Gabriel Genellina | last post: by
1 post views Thread by XIAOLAOHU | last post: by
reply views Thread by leo001 | last post: by
reply views Thread by MichaelMortimer | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.