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

Microsoft JET Database Engine error '80004005'

Status
Not open for further replies.

ca268339

Programmer
Aug 7, 2000
32
US
I'm having a difficult time trying to accomplish a very simple task that is to create a small ASP page using FP that will take the contents of a post and update a DB. Before I can update the DB, I need to connect to the DB and that is the problem - I can't connect.

I'm using what I assume is a standard db call using a non-
DSN based request. Just so you know, the DB defined in FP is NOT defined in ODBC and I'm trying to access via reference.

My code to access:
<%
Dim myConnection
Dim myConnString
Dim GWData
GWData = Server.Mappath("gateway.mdb")
response.write "<p>Value of the gateway DB= " & GWData & "</p>"
set myConnection =server.CreateObject("ADODB.Connection")
myConnection.Open "Data Source=" & Server.Mappath("gateway.mdb") & ";Provider=Microsoft.Jet.OLEDB.4.0;"
%>


Result on the Page:
Value of the gateway DB= D:\Inetpub\webmonitoring\gateway.mdb

Microsoft JET Database Engine error '80004005'

Could not find file 'D:\Inetpub\webmonitoring\gateway.mdb'.

/GWInsertNewSquawk.asp, line 10


Thanks for any and all help, tips, etc.


 
I have connected to an access database this way:
Code:
      set conn = server.createobject("adodb.connection")
      DSNtemp="DRIVER={Microsoft Access Driver (*.mdb)}; "
      DSNtemp=DSNtemp & "DBQ=" & server.mappath("../../../Databases/MyClub/MyClub.mdb")
      conn.Open DSNtemp
Hope this helps
 
DotNetGnat - thanks for the tip, but that I though by using the server reference, (e.g., -mappath) that the correct link would be assured. If I "write" out the -mappath it is the correct link - I think?? I'm not comfortable with the D: that is used on the prefix of the output, as the file actually exists on an external server.

KSbigFoot - If I've simply defined my DB via Access and not registered the DB with ODBC, can I still use the ADODB constructs???
 
Look at these connection strings, select the one suitable for your situation.

Standard security:

"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=\somepath\mydb.mdb;User Id=admin;Password=;"

Workgroup (system database):

"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=\somepath\mydb.mdb;Jet OLEDB:System Database=system.mdw;"

With password:

"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=\somepath\mydb.mdb;Jet OLEDB:Database Password=MyDbPassword;"

This information is taken from
-DNG
 
ksbigfoot - I fiddled around with your suggestion and referenced directly to the /fpdb and I was able to access. Thanks.

My connection prefix now looks like:
dim conn
dim DSNtemp
set conn = server.createobject("adodb.connection")
DSNtemp="DRIVER={Microsoft Access Driver (*.mdb)}; "
DSNtemp=DSNtemp & "DBQ=" & server.mappath("/fpdb/gateway.mdb")
conn.Open DSNtemp
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top