Connect error

Results 1 to 2 of 2

Thread: Connect error

  1. #1
    Join Date
    Dec 1969
    Posts
    159

    Default Connect error

    i get this error when trying to view the contents of a db...<BR><BR>Microsoft OLE DB Provider for ODBC Drivers error &#039 80004005&#039 <BR><BR>[Microsoft][ODBC Microsoft Access 97 Driver] The Microsoft Jet database engine cannot open the file &#039(unknown)&#039. It is already opened exclusively by another user, or you need permission to view its data. <BR><BR>/dbtester.asp, line 18 <BR><BR>and this is my code...<BR><BR>&#060;html><BR>&#060;body><BR><BR>& #060;%<BR>Dim conn<BR>Dim rs<BR>Set conn = Server.CreateObject ("ADODB.Connection")<BR>Set rs = Server.CreateObject ("ADODB.Recordset")<BR>conn.Open "trial"<BR>rs.Open "tblCustomers", conn, 0, 1, 2<BR>While Not rs.EOF<BR>Response.Write rs("FirstName") & " "<BR>Response.Write rs("LastName") & " "<BR>Response.Write "&#060;hr>"<BR>rs.MoveNext<BR>Wend<BR>rs.Close<BR> conn.Close<BR>Set rs = Nothing<BR>Set conn = Nothing<BR>&#037;&#062;<BR><BR>&#060;/body><BR>&#060;/html><BR><BR><BR>Please help, it&#039s driving me to drink! Heavily!

  2. #2
    Join Date
    Dec 1969
    Posts
    511

    Default RE: Connect error

    Ensure you have your ODBC connection set up correctly on the server not on your machine (unless your machine is the server), don&#039t have the database open in Access while you are running the ASP, ensure that, if your on a network, the server account has the correct rights to the database file. Have you password protected the database, if so you will need to include this in the code.<BR><BR>Hope that helps<BR><BR>Pete

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •