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

connecting datebase

Status
Not open for further replies.

zoglchaim770

Programmer
Jun 19, 2003
15
I am a begginer
I connected microsoft access datebase like this:
1. used "odbs", system DSN

2.

dim objconn
set objconn=server.CreateObject ("ADODB.connection")
objconn.ConnectionString = &quot;<name>&quot;
objconn.open

and I get this error
Error Type:
Microsoft OLE DB Provider for ODBC Drivers (0x80004005)
[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.
/school.asp, line 12(In objconn.ConnectionString = &quot;<name>&quot;!)
I don't undestand. My datebase is not in use, it's closed
Does it make a differeents, what kind of format do you use for access datebase 2000 format, 2002 format
 
try this

strConnection = &quot;DSN_FOR_MY_DB&quot; <-- DSN Name
Set dbConn = Server.CreateObject(&quot;ADODB.Connection&quot;)
dbConn.Open strConnection
 
no, didn't work
some how i get the same message.
Any ideas?
 
maybe set objconn=nothing at the end of the code does not work and therefore datebase is allways open
Any Ideas
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top