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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

No Connection to Access 1

Status
Not open for further replies.

Kretzer

Technical User
Nov 6, 2002
37
NL
Hi,

I asume that this will be a mistake quite easy to solve for some of you.

My piece of code looks like this:
strconn ="Driver={Microsoft Access Driver (*.mdb)};Dbq=\\Otdesbwelhttp\clc-mod\cop\cop-test\user.mdb;Uid=Admin;Pwd=;"

set conn = server.createobject("adodb.connection")

conn.open strconn

So what is it supposed to do?
Well, it should give me access to an acces97 DB which is located in exactly the location which is given by Dbq. This means that it is located somewhere in our intranet - not on my local machine.

When performing the last statement "conn.open strconn" I receive the following error.

"Microsoft OLE DB Provider for ODBC Drivers error '80004005'
[Microsoft][ODBC Microsoft Access Driver] The Microsoft Jet database engine cannot open the file '(unknown)'. It is already opened exclusively by another user, or you need permission to view its data. "

And I don't have a clue how to do it right!

Maybe someone here knows an answer?

Thank you in advance
Martin


 
Hi,

solved my own problem.

It works fine here like this:

strdb = "Data Source=" & server.mappath("user.mdb")
set conn =server.CreateObject("Adodb.connection")
strconn = "Provider=Microsoft.jet.oledb.4.0;" & strdb
conn.open strconn

Martin
 
Just had the same problem. The Server.MapPath did it.

Thanks,
Andy
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top