Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Wanet Telecoms Ltd on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

"File already in use" error?

Status
Not open for further replies.

ncar35b

Technical User
Jan 10, 2003
55
US

Hi, I've had a site up for about a month that uses MS Access and got the error below for a second time. The site is done in ASP and the server is Windows 2003. I use OLEDB4.0 to make the connection.

Microsoft JET Database Engine error '80004005'
Could not use ''; file already in use.

when I go onto the server and look in the database directory, I see that there the file (playhouse.mdb) is there, and so is another file (playhouse.ldb). I can't delete the ldb file and the only way to fix the problem is to restart the server, at which time everything goes back to normal.

Does anybody know what would cause this? Am I not closing my DB connections properly? Any help would be greatly appreciated.
 
It does appear that something is leaving the db connection open (or at least making it appear open to Access), but I doubt if it is the ASP connection itself. All things being equal, the ASP connection should time-out after 20 minutes if you did not close it correctly. That should not require the server to be restarted.

Instead, look for something in the ASP causing an occasional error. I would look for something being caused by a missing piece of data such as an unhandled null condition. Since the problem appears to be a blown connection, it would most likely be in the connection string, especially if the sql is developed on-the-fly.

Do you by chance have an "On error resume next" line in your ASP? If so, rem it out and see what happens. You might be getting an error that blows the connection out of the water and are covering it with "resume next".

Obviously, unless you spy something right away, this could take quite some time to troubleshoot since if has only happened a couple of times in a month.

One last thing... If the web server and the database server are not the same severs, then the problem could be network related.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top