ASP Forum
ODBC Microsoft Access Driver] Could not find file
rosh | Posted 5:47am 26. January 2002 Server Time |


Hi can naybody help me with the following error message

Microsoft OLE DB Provider for ODBC Drivers error '80004005'

[Microsoft][ODBC Microsoft Access Driver] Could not find file '(unknown)'.

/webpub/dologin.asp, line 4







<%
  Set objConn = Server.CreateObject("ADODB.Connection")
  Set objRS = Server.CreateObject("ADODB.Recordset")
  objConn.Open "DRIVER=Microsoft Access Driver (*.mdb);DBQ=user.mdb"
  strSQL = "SELECT * FROM Table1 WHERE username = '"& request("frmuser") &"' AND password = '"& request("frmpw") &"'"
  Set objRS=Conn.Execute(strSQL)
  
  IF (NOT objRS.EOF) AND (NOT objRS.BOF) THEN
    session("userloggedin") = "YES"
    response.redirect("publications.htm")
  ELSE
    response.redirect("login.asp")
  END IF
%>
jags | Posted 7:05am 26. January 2002 Server Time |

Are dologin.asp and user.mdb in the same folder?

jags
rosh | Posted 7:40am 26. January 2002 Server Time |

yeah they are in the same folder
jags | Posted 7:58am 26. January 2002 Server Time |

Try this:

objConn.Open "Driver={Microsoft Access Driver (*.mdb)}; DBQ=user.mdb;"

jags
rosh | Posted 4:51pm 26. January 2002 Server Time |

tried this still not working
jags | Posted 6:29pm 26. January 2002 Server Time |

I don't mean to confuse you, but consider this:

<%
Const adOpenForwardOnly = 0
Const adLockReadOnly = 1
Const adCmdText = &H0001

Dim objRS
Dim strConn
Dim strSQL
Dim MdbFilePath

MdbFilePath = Server.MapPath("user.mdb")

strConn="Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & MdbFilePath & ";User Id=admin;Password=pass;"

strSQL = "SELECT * FROM Table1 WHERE username = '"& request("frmuser") &"' AND password = '"& request("frmpw") &"'"

Set objRS = Server.CreateObject("ADODB.Recordset")
objRS.Open strSQL, strConn, adOpenForwardOnly, adLockReadOnly, adCmdText

IF (NOT objRS.EOF) AND (NOT objRS.BOF) THEN
    session("userloggedin") = "YES"
    response.redirect("publications.htm")
  ELSE
    response.redirect("login.asp")
END IF
%>

jags



WizzKidd | Posted 11:33am 27. January 2002 Server Time |

Rosh, are you using a Access databse or something else?

-WizzKidd
WizzKidd | Posted 12:23am 27. January 2002 Server Time |

Rosh, check you email.

-WizzKidd


Reply to Post ODBC Microsoft Access Driver] Could not find file



Back to Forum Page