If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Data Access, Manipulation & Batch Languages > ASP > Could not use ''; file already in use.

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 09-29-03, 11:01
BlueBoy BlueBoy is offline
Registered User
 
Join Date: Sep 2003
Posts: 3
Question Could not use ''; file already in use.

I'm accessing an Access database and I recieve the following error when somebody else is browsing the homepage.

Microsoft JET Database Engine error '80004005'

Could not use ''; file already in use.

/parmax/Connections/Connection.asp, line 12

This happens only when someone else is trying to access the page att the same time (actually both sort of have to hammer the link and then one of the users will get the error message).

From what I've gathered using Access isn't really advisable, but still you would think that it could at least handle 2 users? The load on the site will not be great, but still I don't want to get an errormessage every time there are 2 users browsing.

So what could be the problem?

Any help would be greatly appreciated.

/Erik

Btw the code that causes the error is:

Code:
cst = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" 
cst = cst & server.mappath("connections\db.mdb") & ";Persist Security Info=False"
set connection = Server.CreateObject("ADODB.Connection") 
connection.open cst
Reply With Quote
  #2 (permalink)  
Old 09-30-03, 00:08
Bullschmidt Bullschmidt is offline
Guru
 
Join Date: Jun 2003
Location: USA
Posts: 1,032
Would something like this at the top of the page help at all?:

<%
Response.Buffer = True
%>

Also the following sounds like it isn't even finding the database itself:
Could not use ''; file already in use.
__________________
J. Paul Schmidt, Freelance Web and Database Developer
www.Bullschmidt.com
Access Database Sample, Web Database Sample, ASP Design Tips
Reply With Quote
  #3 (permalink)  
Old 09-30-03, 03:39
BlueBoy BlueBoy is offline
Registered User
 
Join Date: Sep 2003
Posts: 3
Thanks for your help, but it seems to make no difference

Will I just have to live with the possibility that it may crash out with more users on the site? (as mentioned, the load will not be heavy, but still.. with only 2 users?)

And I agree that the "Could not use ''; file already in use." Sounds like it can't find the database. But how could that be? It works fine if its only me checking the page...

Thanks again, and any other help will be greatly appreciated...
Reply With Quote
  #4 (permalink)  
Old 09-30-03, 04:16
BlueBoy BlueBoy is offline
Registered User
 
Join Date: Sep 2003
Posts: 3
After checking a bit more.

It seems it will not happen during normal browsing, but only if two persons hammers a link that accesses the database.

So it seems that it might be that it doesn't have time to close the connection properly, before another person is accessing it. This only happens if a link is clicked basically simultaneously.

But still the results are rather unpredictable... what happens if 10 persons are browsing at the same time. 100?

So is there anyway to, if not solve the problem, but to at least catch the error and display a customized error message?
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On