locked
Vista, IIS7, MS Access 2007 DB, Error - Microsoft JET Database Engine error 080004005 RRS feed

  • Question

  • User895788211 posted

    I've looked at all the posts I can find on this problem and tried all of the fixes but I'm still having a problem. The error I'm getting is:

     

    Microsoft OLE DB Provider for ODBC Drivers error '80004005'

    [Microsoft][ODBC Microsoft Access Driver]General error Unable to open registry key Temporary (volatile) Ace DSN for process 0xd40 Thread 0x17e4 DBC 0xd19004 Jet'.

    /orderforms/OrderFilters.asp, line 9

    Here is my connection string

    Dim MM_Filters_STRING
    MM_Filters_STRING = "Driver={Microsoft Access Driver (*.mdb, *.accdb)};DBQ=C:\inetpub\wwwroot\db\AirManageFilters.accdb"
    %>

    Since I'm using a MS Access 2007 database it looks like I need to use the ODBC driver. When I sent up the recordset I can run a test and get all the data. It just doesn't allow me to display the asp page.

    I will be forever greatful for any and all help!

    Bgoat1

    Thursday, May 1, 2008 6:02 PM

Answers

  • User1073881637 posted

    i would try running process monitor from sysinternals to see if you see a registry failure.

    http://support.microsoft.com/kb/295297

    • Marked as answer by Anonymous Tuesday, September 28, 2021 12:00 AM
    Thursday, May 1, 2008 10:44 PM
  • User1073881637 posted

    I wasn't able to reproduce the error, but my initial response is your using the wrong type of driver.  Here is a sample I did using Access 2007, ASP.NET 2.0 and IIS 7.0 on w2k8.  Note the connection string uses a different driver.  A few search on the web showed using the System.Data.Oledb.  Although I didn't personally try it. Hope this helps.

    http://weblogs.asp.net/steveschofield/archive/2008/05/03/iis-7-0-access-2007-and-asp-net-2-0.aspx

     

    • Marked as answer by Anonymous Tuesday, September 28, 2021 12:00 AM
    Saturday, May 3, 2008 12:21 AM
  • User1073881637 posted

    Here is a example of using a Classic ASP, IIS 7 and a Access 2007 database.  The blog includes sample code you can download. 

    http://weblogs.asp.net/steveschofield/archive/2008/05/03/iis-7-0-classic-asp-and-access-2007.aspx

    • Marked as answer by Anonymous Tuesday, September 28, 2021 12:00 AM
    Saturday, May 3, 2008 1:07 AM
  • User1073881637 posted

    Read this blog posting and make the suggested changes so you can see Classic ASP errors in the browser.

    http://blogs.iis.net/thomad/archive/2007/02/06/security-is-painful.aspx

    %windir%\system32\inetsrv\appcmd set config -section:asp -scriptErrorSentToBrowser:true from the command line to automatically do it. 

    PS: I needed to do this for an example I was playing around with.  I can't get the 'getrows' example I used to use, but that is a different story.

    • Marked as answer by Anonymous Tuesday, September 28, 2021 12:00 AM
    Saturday, May 3, 2008 3:12 PM
  • User895788211 posted

    I got it!!!!

    The answer was to run:

    %windir%\system32\inetsrv\appcmd set config /section:applicationPools /[name='DefaultAppPool'].processModel.loadUserProfile:false

    I'm sure with the other things I ran too but I hadn't run across this one yet until tonight when I did a search on Unspecified error.

    Thanks for sticking with me on this. That really helped keep me going until I found it.

    • Marked as answer by Anonymous Tuesday, September 28, 2021 12:00 AM
    Monday, May 5, 2008 8:39 PM

All replies

  • User1073881637 posted

    i would try running process monitor from sysinternals to see if you see a registry failure.

    http://support.microsoft.com/kb/295297

    • Marked as answer by Anonymous Tuesday, September 28, 2021 12:00 AM
    Thursday, May 1, 2008 10:44 PM
  • User895788211 posted

    I'm not sure what sysinternals is. How do I run it and where do I look?

    I did try the fix changing the permissions on the registry but that didn't seem to work either.

     

    Friday, May 2, 2008 10:24 AM
  • User895788211 posted

    I've tried this one before too and couldn't get it to work so I'm not sure what I'm doing wrong.

    I get the error: Format of the initialization string does not conform to the OLE DB specification.

    My string is: MM_Filters_STRING = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Server.MapPath("/db/AirManageFilters.accdb")

    Does this have anything to do with using a MS Access 2007 database maybe? I tried it with a MS Access 2003 database and it seems to do the same thing.

    Friday, May 2, 2008 11:29 AM
  • User1073881637 posted

    I wasn't able to reproduce the error, but my initial response is your using the wrong type of driver.  Here is a sample I did using Access 2007, ASP.NET 2.0 and IIS 7.0 on w2k8.  Note the connection string uses a different driver.  A few search on the web showed using the System.Data.Oledb.  Although I didn't personally try it. Hope this helps.

    http://weblogs.asp.net/steveschofield/archive/2008/05/03/iis-7-0-access-2007-and-asp-net-2-0.aspx

     

    • Marked as answer by Anonymous Tuesday, September 28, 2021 12:00 AM
    Saturday, May 3, 2008 12:21 AM
  • User1073881637 posted

    Here is a example of using a Classic ASP, IIS 7 and a Access 2007 database.  The blog includes sample code you can download. 

    http://weblogs.asp.net/steveschofield/archive/2008/05/03/iis-7-0-classic-asp-and-access-2007.aspx

    • Marked as answer by Anonymous Tuesday, September 28, 2021 12:00 AM
    Saturday, May 3, 2008 1:07 AM
  • User895788211 posted

    I can now connect using the new driver and see the table in DreamWeaver but when I try and display records I get a different message.

    An error occurred on the server when processing the URL. Please contact the system administrator

    Very informative since I'm the only system administrator in my house and I have no idea what to look for now. Why does this have to be so hard?

    I really do appreciate all the help. Just getting a little frustrated at this point.

    Thanks!

    Saturday, May 3, 2008 11:22 AM
  • User1073881637 posted

    Read this blog posting and make the suggested changes so you can see Classic ASP errors in the browser.

    http://blogs.iis.net/thomad/archive/2007/02/06/security-is-painful.aspx

    %windir%\system32\inetsrv\appcmd set config -section:asp -scriptErrorSentToBrowser:true from the command line to automatically do it. 

    PS: I needed to do this for an example I was playing around with.  I can't get the 'getrows' example I used to use, but that is a different story.

    • Marked as answer by Anonymous Tuesday, September 28, 2021 12:00 AM
    Saturday, May 3, 2008 3:12 PM
  • User895788211 posted

    Does that get turned off when ever you reboot? I thought I had it sent but anyway I did it again and I get the following:

     Microsoft Office Access Database Engine error '80004005'

    Unspecified error

    /Untitled-1.asp, line 9

     Here is my Connection parameters

    <%
    ' FileName="Connection_ado_conn_string.htm"
    ' Type="ADO"
    ' DesigntimeType="ADO"
    ' HTTP="false"
    ' Catalog=""
    ' Schema=""
    Dim MM_Filters_STRING
    MM_Filters_STRING = "Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\inetpub\wwwroot\db\AirManageFilters.accdb;"
    %>

    And this is the very simple display that I am try to test.

    <%@LANGUAGE="VBSCRIPT" CODEPAGE="65001"%>
    <!--#include virtual="/Connections/Filters.asp" -->
    <%
    Dim Recordset1
    Dim Recordset1_cmd
    Dim Recordset1_numRows

    Set Recordset1_cmd = Server.CreateObject ("ADODB.Command")
    Recordset1_cmd.ActiveConnection = MM_Filters_STRING
    Recordset1_cmd.CommandText = "SELECT * FROM Filters"
    Recordset1_cmd.Prepared = true

    Set Recordset1 = Recordset1_cmd.Execute
    Recordset1_numRows = 0
    %>
    <%
    Dim Repeat1__numRows
    Dim Repeat1__index

    Repeat1__numRows = 10
    Repeat1__index = 0
    Recordset1_numRows = Recordset1_numRows + Repeat1__numRows
    %>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>Untitled Document</title>
    </head>

    <body>
    <%
    While ((Repeat1__numRows <> 0) AND (NOT Recordset1.EOF))
    %>
      <table width="850" border="0">
        <tr>
          <td><%=(Recordset1.Fields.Item("Description").Value)%></td>
          <td><%=(Recordset1.Fields.Item("Part #").Value)%></td>
          <td><%=(Recordset1.Fields.Item("MFG").Value)%></td>
        </tr>
      </table>
      <%
      Repeat1__index=Repeat1__index+1
      Repeat1__numRows=Repeat1__numRows-1
      Recordset1.MoveNext()
    Wend
    %>
    </body>
    </html>
    <%
    Recordset1.Close()
    Set Recordset1 = Nothing
    %>

    One thing that is strange is when I try and use the "Server.Mapping" instead of the direct path the connection doesn't work. At least it doesn't like it in the DreamWeaver custome connection string. I was going to work on this next but maybe one thing has to to with the other.

    The error that is showing up in the log is:

    GET /Untitled-1.asp |9|80004005|Unspecified_error 80 - ::1 Mozilla/4.0+(compatible;+MSIE+7.0;+Windows+NT+6.0;+SLCC1;+.NET+CLR+2.0.50727;+Media+Center+PC+5.0;+.NET+CLR+3.0.04506;+.NET+CLR+1.1.4322) 500 0 0

     

    Saturday, May 3, 2008 4:26 PM
  • User1073881637 posted

    Interesting.  I used your code, changed the variables a little to match my access 2007 database and it worked like a charm. Good job on the code.  I'd suggest you try writing one column at a time to narrow it down to which column it could be.   Your column names have spaces and characters, this could be a lead.   You might need to brackets around them.   

    <%@LANGUAGE="VBSCRIPT" CODEPAGE="65001"%>
    <%
    MM_Filters_STRING = "Provider=Microsoft.ACE.OLEDB.12.0;Data Source=" & Server.MapPath("App_Data\authors.accdb")

    Dim Recordset1
    Dim Recordset1_cmd
    Dim Recordset1_numRows

    Set Recordset1_cmd = Server.CreateObject ("ADODB.Command")
    Recordset1_cmd.ActiveConnection = MM_Filters_STRING
    Recordset1_cmd.CommandText = "SELECT * FROM Authors"
    Recordset1_cmd.Prepared = true

    Set Recordset1 = Recordset1_cmd.Execute
    Recordset1_numRows = 0
    %>
    <%
    Dim Repeat1__numRows
    Dim Repeat1__index

    Repeat1__numRows = 10
    Repeat1__index = 0
    Recordset1_numRows = Recordset1_numRows + Repeat1__numRows
    %>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>Untitled Document</title>
    </head>

    <body>
    <%
    While ((Repeat1__numRows <> 0) AND (NOT Recordset1.EOF))
    %>
      <table width="850" border="0">
        <tr>
          <td><%=(Recordset1.Fields.Item("Field1").Value)%></td>
          <td><%=(Recordset1.Fields.Item("Field2").Value)%></td>
        </tr>
      </table>
      <%
      Repeat1__index=Repeat1__index+1
      Repeat1__numRows=Repeat1__numRows-1
      Recordset1.MoveNext()
    Wend
    %>
    </body>
    </html>
    <%
    Recordset1.Close()
    Set Recordset1 = Nothing
    %>

    Saturday, May 3, 2008 10:53 PM
  • User1073881637 posted

    Here is my sample using your code.

    http://iislogs.com/articles/access2007/authors2.zip

    Hope this helps.

     

    Saturday, May 3, 2008 11:10 PM
  • User895788211 posted

    I tried it with your code just changing the database and table name. Got the Server.Mappath to work correctly now but I'm still getting the same error at line 10 which is Recordset1_cmd.ActiveConnection = MM_Filters_STRING

    Microsoft Office Access Database Engine error '80004005'

    Unspecified error

    /Untitled-2.asp, line 10

    Could this have something to do with security and I'm just not seeing it? I've gone through what I've thought is all the information on it and set them to what I think is correct but nothing has really change. It just seems I'm doing everything write on the coding side now so there has to be something else.

    Monday, May 5, 2008 2:49 PM
  • User895788211 posted

    I got it!!!!

    The answer was to run:

    %windir%\system32\inetsrv\appcmd set config /section:applicationPools /[name='DefaultAppPool'].processModel.loadUserProfile:false

    I'm sure with the other things I ran too but I hadn't run across this one yet until tonight when I did a search on Unspecified error.

    Thanks for sticking with me on this. That really helped keep me going until I found it.

    • Marked as answer by Anonymous Tuesday, September 28, 2021 12:00 AM
    Monday, May 5, 2008 8:39 PM
  • User-108200915 posted

    Hi I am facing the error

    Microsoft Office Access Database Engine error '80004005'

    Unspecified error

     I run

    %windir%\system32\inetsrv\appcmd set config /section:applicationPools /[name='DefaultAppPool'].processModel.loadUserProfile:false

    But nothing works.

    The code is

    <html>
    <body>

    <%
    Dim conn
    Dim rs
    Dim x

     


    set conn=Server.CreateObject("ADODB.Connection")
    conn.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & _
    Server.MapPath ("itemdetail.mdb") & ";"
    conn.Open
    set rs = Server.CreateObject("ADODB.recordset")
    rs.Open "Select * from item", conn


    do until rs.EOF
        for each x in rs.Fields
           Response.Write(x.name)
           Response.Write(" = ")
           Response.Write(x.value & "<br />")
        next
        Response.Write("<br />")
        rs.MoveNext
    loop

    rs.close
    conn.close

     

     


    %>

    </body>
    </html>

    I have laptop with windows vista home premium. IIS version  : 7.0 

    All database and asp files are in same folder. I gave full permission on database

     

    Nothing works

     

    Can anyone help me ?

    Thanks 

     

    Sunday, August 31, 2008 1:08 PM
  • User1073881637 posted

    http://blogs.iis.net/bills/archive/2007/05/21/tips-for-classic-asp-developers-on-iis7.aspx

    Also, if the access db is an older version, make sure to install the version of MDAC that would go with your version of Access.

    Sunday, August 31, 2008 11:24 PM
  • User-108200915 posted

    Hi

    I have access 2007. But i am using database in 2000 format. I dont know how to check MDAC or what version of MDAC i need to install  ???

     Can u please tell me ?

    Thanks

    Leena 

     

    Monday, September 1, 2008 5:49 AM
  • Wednesday, September 3, 2008 8:24 AM