Server.MapPath access help

Discussion in 'Databases' started by Akumaownz, Dec 27, 2003.

Thread Status:
Threads that have been inactive for 5 years or longer are closed to further replies. Please start a new thread.
  1. I am having trouble setting my Server.MapPath to my access db for my little guestbook.
    atm it is set to Server.MapPath("\guestbook.mdb") and I am getting this error when I submit data.

    Microsoft OLE DB Provider for ODBC Drivers error '80004005'

    [Microsoft][ODBC Microsoft Access Driver]General error Unable to open registry key 'Temporary (volatile) Jet DSN for process 0x7068 Thread 0x1d08 DBC 0x15a56cc Jet'.

    /guestbookThankYou.asp, line 14


    This is my asp code
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-2022-jp"></head>

    <p align="center">

    .<img src="horse.jpg" width="147" height="147">

    Thank you for signing my guestbook..

    </p>
    <p align="center"> <a href="http://www.ozhorse.info"><img src="home.gif" width="90" height="40" border="0"></a></p>
    <FORM METHOD="POST" ACTION="guests.asp">
    <%
    Set cn = Server.CreateObject("ADODB.Connection")
    openStr = "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=" & Server.MapPath("\guestbook.mdb")
    cn.Open openStr
    SQL = "SELECT * FROM guestbook"
    Set record = Server.CreateObject("ADODB.Recordset")
    record.Open sql, cn, 2, 2
    record.AddNew
    record("name") = Request.Form("name")
    record("email") = Request.Form("email")
    record("url") = Request.Form("url")
    record("message") = Request.Form("message")
    record("todaysDate") = Now()
    record.Update
    record.Close
    Set record = Nothing
    cn.Close
    Set cn = Nothing

    %>
    <INPUT TYPE="BUTTON" VALUE="VIEW GUESTBOOK"
    onClick="location.href='guests.asp';">
    </form>
    </body>
    </html>


    Any Ideas??
     
  2. Bruce

    Bruce DiscountASP.NET Staff

    Is the guestbook.mdb in your root directory?

    In addition, make sure the database is created with Access 2000 or later.

    quote:Originally posted by Akumaownz

    I am having trouble setting my Server.MapPath to my access db for my little guestbook.
    atm it is set to Server.MapPath("\guestbook.mdb") and I am getting this error when I submit data.

    Microsoft OLE DB Provider for ODBC Drivers error '80004005'

    [Microsoft][ODBC Microsoft Access Driver]General error Unable to open registry key 'Temporary (volatile) Jet DSN for process 0x7068 Thread 0x1d08 DBC 0x15a56cc Jet'.

    /guestbookThankYou.asp, line 14


    This is my asp code
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-2022-jp"></head>

    <p align="center">

    .<img src="horse.jpg" width="147" height="147">

    Thank you for signing my guestbook..

    </p>
    <p align="center"> <a href="http://www.ozhorse.info"><img src="home.gif" width="90" height="40" border="0"></a></p>
    <FORM METHOD="POST" ACTION="guests.asp">
    <%
    Set cn = Server.CreateObject("ADODB.Connection")
    openStr = "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=" & Server.MapPath("\guestbook.mdb")
    cn.Open openStr
    SQL = "SELECT * FROM guestbook"
    Set record = Server.CreateObject("ADODB.Recordset")
    record.Open sql, cn, 2, 2
    record.AddNew
    record("name") = Request.Form("name")
    record("email") = Request.Form("email")
    record("url") = Request.Form("url")
    record("message") = Request.Form("message")
    record("todaysDate") = Now()
    record.Update
    record.Close
    Set record = Nothing
    cn.Close
    Set cn = Nothing

    %>
    <INPUT TYPE="BUTTON" VALUE="VIEW GUESTBOOK"
    onClick="location.href='guests.asp';">
    </form>
    </body>
    </html>


    Any Ideas??
    </blockquote id="quote"></font id="quote">
     
  3. It works now. I havent changed anything so I guess it must have been a server problem.

    [8D]
     
  4. Now I have this problem too.

    The strange thing is that I use the same code as always and all my asp/access apps on this server are all having the same problem.

    This is the connection code I use:
    -------------------------------
    <%
    Session.LCID = timezone
    set dbCon=Server.CreateObject("ADODB.Connection")
    call dbCon.open("DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=" & Server.MapPath("db/forum.mdb"))
    --------------------------------

    The error is:
    --------------------------
    Microsoft OLE DB Provider for ODBC Drivers error '8007000e'

    [Microsoft][ODBC Microsoft Access Driver]General error Unable to open registry key 'Temporary (volatile) Jet DSN for process 0x474 Thread 0x11d0 DBC 0x9e69e64 Jet'.

    /forum/default.asp, line 14
    ------------------------------

    I have no idea what to do. Since I havent changed anything in the code for some of the apps in almost a year (and they have been working since then) I dont want to change my code until I know the problem is in my code. I hope that this is a servererror that will be fixed [:p] What do you think - is it a server issue or do I have some errors in my code?

    Malin
     
  5. Bruce

    Bruce DiscountASP.NET Staff

    This could be a server problem.

    please create support ticket

    quote:Originally posted by Malin

    Now I have this problem too.

    The strange thing is that I use the same code as always and all my asp/access apps on this server are all having the same problem.

    This is the connection code I use:
    -------------------------------
    <%
    Session.LCID = timezone
    set dbCon=Server.CreateObject("ADODB.Connection")
    call dbCon.open("DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=" & Server.MapPath("db/forum.mdb"))
    --------------------------------

    The error is:
    --------------------------
    Microsoft OLE DB Provider for ODBC Drivers error '8007000e'

    [Microsoft][ODBC Microsoft Access Driver]General error Unable to open registry key 'Temporary (volatile) Jet DSN for process 0x474 Thread 0x11d0 DBC 0x9e69e64 Jet'.

    /forum/default.asp, line 14
    ------------------------------

    I have no idea what to do. Since I havent changed anything in the code for some of the apps in almost a year (and they have been working since then) I dont want to change my code until I know the problem is in my code. I hope that this is a servererror that will be fixed [:p] What do you think - is it a server issue or do I have some errors in my code?

    Malin

    </blockquote id="quote"></font id="quote">
     
Thread Status:
Threads that have been inactive for 5 years or longer are closed to further replies. Please start a new thread.

Share This Page