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

Cannot Access Database!!

Status
Not open for further replies.

ShotoCon

Technical User
Apr 27, 2008
14
US
Hi There,

Was developing a site on my old machine and have now transferred to my new machine which, unfortunately, has vista installed on it and so comes with IIS 7 and now my site will no longer connect to the database :(

Figured it was because the new machine has Access 2007 installed instead of Access 2003 - using an access db as this is just a quick bit of recap development for myself.

Tested using both connection string types (yes, i converted the database to an access 2007 db aslo) and still couldnt do it. Here is the code and the subsequent error messages i got, please note that these are test pages purely for the connections which aren't working:

Access 2003 stuff

Code:
<html>
<body>
<%
  Dim MyConnection
  Dim MyConnectionString
  Dim MySQLStatement

  MyConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;" & _
    "Data Source=eBug.mdb;"

  MySQLStatement = "INSERT INTO Test Values('Test')"

  Set MyConnection = Server.CreateObject("ADODB.Connection")

  MyConnection.Open MyConnectionString
  MyConnection.Execute(MySQLStatement)
  MyConnection.Close()

  Response.Write("Record inserted successfully")

  Set MyConnection = Nothing
%>
</body>
</html>

and its output

Code:
Microsoft JET Database Engine error '80004005'

Unspecified error

/test2003.asp, line 15

Access 2007 stuff
Code:
<html>
<body>
<%
  Dim MyConnection
  Dim MyConnectionString
  Dim MySQLStatement

  MyConnectionString = "Provider=Microsoft.ACE.OLEDB.12.0;" & _
    "Data Source= eBug.accdb;"

  MySQLStatement = "INSERT INTO Test Values('Test')"

  Set MyConnection = Server.CreateObject("ADODB.Connection")

  MyConnection.Open MyConnectionString
  MyConnection.Execute(MySQLStatement)
  MyConnection.Close()

  Response.Write("Record inserted successfully")

  Set MyConnection = Nothing
%>
</body>
</html>

and its output

Code:
Microsoft Office Access Database Engine error '80004005'

Unspecified error

/test2007.asp, line 15

The local users all have full access control over the sites directory. Its running in the defaultAppPool and all that good stuff, everything is fairly standard and open, nothing fancy has been done with it as it will NEVER be opened to the public, this is solely dev practice for me because its been a while.

Anyone out there got any suggestions on what could be doing this? I have also posted this in the ASP forum incase the problem lies there.

Any and all help appreciated.
 
Hi Chris,

IIS USER has been granted full control over that folder and all its contents :(

ALL users have in fact in order for me to try and work around this issue, to avail as of yet tho

ShotoCon
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top