473,706 Members | 2,296 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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.Doe vents() )
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 2897
Hi Sagaret,
May be you can try the Handle freeware on Sysinternals.co m 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******** ********@TK2MSF TNGP09.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.Doe vents() )
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
13631
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 list of files. Therefore, some temporary files are created which should be deleted after processing is finished. This Thread is called several times. When I call it the first time, everything's ok and no errors occur. In the second call, I can...
8
7253
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 last fourteen days we encounter an error message: 'file locked by another user'. I don't seem to recall that I made changes to the database since let's say Dec 10, 2004.
4
2765
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
2824
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 cannot later overwrite it (during the application), even after i have closed it.
1
2452
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 create a circumstance where I get "file locked by another user". I figured out this happens when I overlook a case where the datareader does not get closed and the connection does get closed. The file then is locked and the only way to unlock it is to...
5
2276
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: - closing file (in part made in vc.net) - closing object (vc) - calling GC.Collect - calling GC.WaitForPendingFinalizers
1
2046
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 in the right direction to unlock this file from old user so I can update the main index.asp file Regards: Eric
0
964
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 updated file. I faced problem when updated file is locked for writing until vim editor is closed. launch vim -update file -launch msvc -file locked launch vim -update file -launch msvc -close vim -file locked
0
1508
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 could try using: del input, output, filter That should release all remaining references to the output file, I presume. Or locate the inner reference to the output file (filter.something perhaps?) and explicitely close it.
8
7232
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
8781
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8696
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9285
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8993
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
4448
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4709
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3147
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2500
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2094
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.