Jump to content

Access & ASP connection problem


rekki

Recommended Posts

I read the ADO connection tutorial at http://www.w3schools.com/ado/ado_connect.asp and tried it but I'm getting errors.heres the code, the access db file is called toa.mdb:

<html><head>  <body>  <%	set conn=Server.CreateObject("ADODB.Connection")	conn.Provider="Microsoft.Jet.OLEDB.4.0"	conn.Open "C:\Inetpub\wwwroot\toa.mdb"  %> </body></head></html>

I get this error:

Error Type:Microsoft JET Database Engine (0x80004005)Unspecified error/myhome/vb_test.asp, line 9

Then I tried doing an ODBC connection

<html><head>  <body>  <%	set conn=Server.CreateObject("ADODB.Connection") 	conn.Open "toa"  %> </body></head></html>

And got 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./myhome/vb_test.asp, line 7

I followed the instructions to "An ODBC Connection to an MS Access Database". I have IIS installed, but no admin rights since its a work computer.

Link to comment
Share on other sites

The problem can occur only when the data source is opened under the Microsoft Internet Information Server (IIS) or a Microsoft Windows NT service but not under a logged-on user account.
It sounds like an account issue instead of an environment variable issue.
Link to comment
Share on other sites

ya it is an account issue, since I don't have admin rights and its a PITA to go through helpdesk to get it here at work, i've been bringing in my laptop and developing on it instead.thanks for the help.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...