473,386 Members | 1,798 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 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 2881
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Albert Greinöcker | last post by:
Hi ng, I have a very strange problem within my c# application: One of the (background) Threads in my application is responsible for some image processing tasks (like resizing, clipping, ..) on a...
8
by: Lieve | last post by:
Hello, I set up a database a few months ago and placed it on our company network. In the beginning, there was no problem opening it, even when someone else was working in it at that time. The...
4
by: hkappleorange | last post by:
I ued this code to connect to a mdb file A = New OleDbConnection( "PROVIDER=Microsoft.Jet.OLEDB.4.0;DATA Source=C:\Inetpub\wwwroot\ASPX\Authors.mdb" )
3
by: thebhone | last post by:
I am creating a website updater program. Currently working on the image replacement module here. For some reason, after an image (say /images/1.jpg) has been used/opened in the application. I...
1
by: veeves | last post by:
I am using Access 2000 and 2002. I use Access only to create the database design. Then I move the MDB file to a server where an application connects to it using ASP.Net. Occasionally I will...
5
by: buu | last post by:
I have an app made in vb.net with a part of it made in vc.net. after finishing a data processing with a file, I would like to delete that file, but file remains locked to be sure, I was: -...
1
by: boss306 | last post by:
Unable to undo checkout .asp file locked by X:user Ms frontpage 2003 main index.asp file is checked out and locked for editting by a user in which is no longer with company. Could anyone point me...
0
by: Dmitry Teslenko | last post by:
Hello! I use some script in python 2.5 from vim editor (it has python bindings) that updates some file and then launches another program (ms visual studio, for example) to do something with...
0
by: Gabriel Genellina | last post by:
En Tue, 13 May 2008 11:57:03 -0300, Dmitry Teslenko <dteslenko@gmail.com> escribió: Is the code above contained in a function? So all references are released upon function exit? If not, you...
8
by: hd95 | last post by:
How do i find a process that has a file locked and kill it? I am using VB.net
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.