newbie: error ...HHHEEELLLPPP!!!!

Ask a Question related to ASP Database, Design and Development.

  1. #1

    Default newbie: error ...HHHEEELLLPPP!!!!

    ok I'm VERY new to ASP and have managed to get a page up and running that
    reads from a database...I can even get it to delete a row...... BUT...
    whenever I try the add page I get the following error:

    Error Type:
    Microsoft OLE DB Provider for ODBC Drivers (0x80004005)
    [Microsoft][ODBC Microsoft Access Driver]General error Unable to open
    registry key 'Temporary (volatile) Jet DSN for process 0x30c Thread 0x7c8
    DBC 0x26f8e74 Jet'.
    /people/gotodb.asp, line 6
    (I have checked this and it seems fine....)

    I was following an example on a webpage but it doesn't cover this....

    the db is an acccess one, I am trying to write to 2 of the fields out of the
    4 that exist in the table.

    I am sure that my conection is wrong but b4 my format and reinstall last
    night everything was working 'semi' fine.

    Wayne..
    PS sorry for the very messy code :(

    original code:

    <%@ Language=VBScript %>
    <%

    'Store the variable to name. txtnameadd is the text box in index.htm
    'If you study the HTML code of it you will understand
    'Request.form function request the value from the form.
    name = server.HtmlEncode(request.form("txtnameadd"))
    About = server.HtmlEncode(request.form("txtnameadd"))
    'Create object. In this case Connection to a database
    Set Conn = Server.CreateObject("ADODB.Connection")

    'Select provider
    Conn.Provider = "Microsoft.Jet.OLEDB.4.0"
    'Select data source.
    'Server.MapPath function is equivalent to app.path function of VB
    'It returns the directory in which the script is present
    Conn.ConnectionString = "Data Source=" & Server.MapPath ("people.mdb")
    'Open the connection
    Conn.Open

    'Create recordset
    Set Rs = Server.CreateObject("ADODB.Recordset")
    'Open recordset with the connection which we have created earlier
    'you must be familiar with SELECT statement ,
    'If not check my VB tutorial section.
    Rs.Open "SELECT * from people", Conn, 1,3

    'Add a blank record
    Rs.addnew
    'Store name to
    Rs("name") = name
    Rs("About") = About
    Rs.update

    'Deinitialize the Connection and Recordset
    set Rs = nothing
    set Conn = nothing


    %>
    <p>User Successfully added</p>
    <p><a href="people2.asp">Return to Index</a></p>


    current code:

    <%@ Language=VBScript %>
    <%
    'Dimension variables
    Dim adoCon 'Holds the Database Connection Object
    Dim rsAddComments 'Holds the recordset for the new record to be added
    Dim strSQL 'Holds the SQL query to query the database

    'Store the variable to name. txtnameadd is the text box in index.htm
    'If you study the HTML code of it you will understand
    'Request.form function request the value from the form.
    name = server.HtmlEncode(request.form("txtnameadd"))
    About = server.HtmlEncode(request.form("About"))
    'Create object. In this case Connection to a database
    'Set Conn = Server.CreateObject("ADODB.Connection")
    Set adoCon = Server.CreateObject("ADODB.Connection")
    'Select provider
    'Conn.Provider = "Microsoft.Jet.OLEDB.4.0"
    'Select data source.
    'Server.MapPath function is equivalent to app.path function of VB
    'It returns the directory in which the script is present
    adoCon.Open "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=" &
    Server.MapPath("people.mdb")
    'Conn.ConnectionString = "Data Source=" & Server.MapPath ("people.mdb")
    'Open the connection
    'Conn.Open

    'Set an active connection to the Connection object using DSN connection
    adoCon.Open "DSN=guestbook"
    'Create an ADO recordset object
    Set rsAddComments = Server.CreateObject("ADODB.Recordset")
    'Create recordset
    'Set Rs = Server.CreateObject("ADODB.Recordset")
    'Open recordset with the connection which we have created earlier
    'you must be familiar with SELECT statement ,
    'If not check my VB tutorial section.
    'Rs.Open "SELECT * from people", Conn, 1,3
    'Initialise the strSQL variable with an SQL statement to query the database
    strSQL = "SELECT * FROM people;"

    'Set the cursor type we are using so we can navigate through the recordset
    rsAddComments.CursorType = 2
    'Set the lock type so that the record is locked by ADO when it is updated
    rsAddComments.LockType = 3
    'Open the recordset with the SQL query
    rsAddComments.Open strSQL, adoCon
    'Tell the recordset we are adding a new record to it
    rsAddComments.AddNew
    'Add a new record to the recordset
    rsAddComments.Fields("Name") = Request.Form("name")
    rsAddComments.Fields("About") = Request.Form("About")
    'Write the updated recordset to the database
    rsAddComments.Update
    'Reset server objects
    rsAddComments.Close
    Set rsAddComments = Nothing
    Set adoCon = Nothing

    'Redirect to the guestbook.asp page
    Response.Redirect "people2.asp"
    %>



    Wayne... Guest

  2. Similar Questions and Discussions

    1. FMS3 Newbie - Error help
      Fresh install of FMS3 (paid version). Other than the setup settings, I haven't modified anything. I have a commercial chat/video product that the...
    2. mysql error [newbie]
      I just installed mysql and ran the upgrade for fedora 4 but i get this error # mysql ERROR 2002 (HY000): Can't connect to local MySQL server...
    3. Newbie - Directive causes syntax error
      I am studying a Wrox book, "Beginning ASP.NET 1.1 with VB.NET". In the chapter on Web Services I am trying an example in VS 2003 with VB.NET that...
    4. Error 500 newbie question
      Hi all, I'm running Win2k Pro with IIS on it, at home. My ISP doesn't allow me to publish to port 80, so I'm publishing on 2850. My HTML runs...
    5. Please help with this error - newbie
      Hi there, I just started a small application with a list with one table, and hyperlink to retrieve and display detail data. Also create a XST,...
  3. #2

    Default Re: newbie: error ...HHHEEELLLPPP!!!!

    Wayne... wrote:
    > ok I'm VERY new to ASP and have managed to get a page up and running
    > that reads from a database...I can even get it to delete a row......
    > BUT... whenever I try the add page I get the following error:
    >
    > Error Type:
    > Microsoft OLE DB Provider for ODBC Drivers (0x80004005)
    > [Microsoft][ODBC Microsoft Access Driver]General error Unable to open
    > registry key 'Temporary (volatile) Jet DSN for process 0x30c Thread
    > 0x7c8 DBC 0x26f8e74 Jet'.
    > /people/gotodb.asp, line 6
    > (I have checked this and it seems fine....)
    [url]http://www.aspfaq.com/show.asp?id=2154[/url]
    [url]http://www.aspfaq.com/show.asp?id=2009[/url]

    HTH,
    Bob Barrows

    --
    Microsoft MVP -- ASP/ASP.NET
    Please reply to the newsgroup. The email account listed in my From
    header is my spam trap, so I don't check it very often. You will get a
    quicker response by posting to the newsgroup.


    Bob Barrows Guest

Posting Permissions

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

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139