Solved

"Could not use '(unknown)'; file already in use."?????

Posted on 2004-04-01
6
1,596 Views
Last Modified: 2007-12-19
I am getting the following error:

Microsoft OLE DB Provider for ODBC Drivers error '80004005'
[Microsoft][ODBC Microsoft Access Driver] Could not use '(unknown)'; file already in use.

Using ASP:
I am assuming that I am somehow opening the .MDB exclusively but I can't find where (or I'm wrong :) ).
Checked the DSN in ODBC manager and it is not set to exclusive.

This is how I'm opening it:
    set conn = createobject("adodb.connection")
    conn.connectionstring="Provider=MSDASQL.1;Persist Security Info=False;Data Source=Test"
    conn.open


Thanks!
   - Marc
0
Comment
Question by:MarcGraff
  • 3
  • 2
6 Comments
 
LVL 8

Expert Comment

by:dds110
ID: 10734873
you're using the wrong connection string for Access.

Try this one:

adoconn.connectionstring="Provider=Microsoft.Jet.OLEDB.4.0;Data Source=DatabasePathAndName.mdb;Jet OLEDB:Database Password=;"
0
 
LVL 8

Accepted Solution

by:
dds110 earned 500 total points
ID: 10734889
Here's an example from one of my pages:

Dim adoconn

Set adoconn = Server.createobject("ADODB.Connection")

adoconn.connectionstring="Provider=Microsoft.Jet.OLEDB.4.0;Data Source=\\jcknt01\JCSC\Db\webUsers.mdb;Jet OLEDB:Database Password=;"
0
 
LVL 6

Expert Comment

by:BubbaisBest
ID: 10734894
Marc,

It sounds like 1 of 2 things.  First is the database is open somewhere with MS Access.  If you find that then you can just close the file and be okay.  The 2nd thing is that a page didn't close everything properly.  If this is the case, make a copy of the database, delete the current one, and rename the copy back to the original name.  

Good luck,
Bubs
0
Ransomware: The New Cyber Threat & How to Stop It

This infographic explains ransomware, type of malware that blocks access to your files or your systems and holds them hostage until a ransom is paid. It also examines the different types of ransomware and explains what you can do to thwart this sinister online threat.  

 
LVL 8

Expert Comment

by:dds110
ID: 10734903
try this site for more information on connection strings

http://www.connectionstrings.com/
0
 
LVL 6

Expert Comment

by:BubbaisBest
ID: 10734956
dds110 makes an excellent point as well.  Try his first.  bubs
0
 
LVL 1

Author Comment

by:MarcGraff
ID: 10782567
Thanks! And sorry for the wait!

   - Marc
0

Featured Post

Ransomware-A Revenue Bonanza for Service Providers

Ransomware – malware that gets on your customers’ computers, encrypts their data, and extorts a hefty ransom for the decryption keys – is a surging new threat.  The purpose of this eBook is to educate the reader about ransomware attacks.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Experts-Exchange is a great place to come for help with solutions for your database issues, and many problems are resolved within minutes of being posted.  Others take a little more time and effort and often providing a sample database is very helpf…
You need to know the location of the Office templates folder, so that when you create new templates, they are saved to that location, and thus are available for selection when creating new documents.  The steps to find the Templates folder path are …
In Microsoft Access, learn the trick to repeating sub-report headings at the top of each page. The problem with sub-reports and headings: Add a dummy group to the sub report using the expression =1: Set the “Repeat Section” property of the dummy…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

679 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question