Advertisement
Help Keep Boards Alive. Support us by going ad free today. See here: https://subscriptions.boards.ie/.
If we do not hit our goal we will be forced to close the site.

Current status: https://keepboardsalive.com/

Annual subs are best for most impact. If you are still undecided on going Ad Free - you can also donate using the Paypal Donate option. All contribution helps. Thank you.
https://www.boards.ie/group/1878-subscribers-forum

Private Group for paid up members of Boards.ie. Join the club.
Hi all, please see this major site announcement: https://www.boards.ie/discussion/2058427594/boards-ie-2026

Asp Trouble

  • 11-02-2004 01:38PM
    #1
    Registered Users, Registered Users 2, Paid Member Posts: 7,251 ✭✭✭


    Hey all I've got a problem. I have a register asp page and it's not working. I haven't a clue why. It's being working b4 !

    This is the code!


    <%
    'Declare all local variables
    dim conn
    dim rs
    dim strconn
    dim strsql


    strsql = ""
    'set connection string to local variable-I use a DSN-less connection
    strconn = "DRIVER=Microsoft Access Driver (*.mdb);DBQ=" & Server.MapPath("users.mdb")

    'build the sql statement based on the input from the form
    strsql="INSERT INTO tableusers (Firstname, Surname, Age, Address1, Address2, Town, County1, Email, Username, Password) "
    strsql=strsql & "Values('" &request("Firstname") & "' , '" &request("Surname") & "' , '" &request("Age") & "', '" &request("Address1") & "' , '" &request("Address2") & "','" &request("Town") & "' , '" &request("County1") & "', '" &request("Email") & "', '" &request("Username") & "', '" &request("Password") & "')"




    'Set connection object
    set conn = server.createobject("adodb.connection")
    conn.open strconn
    'Use the execute method of the connection object the insert the record
    conn.execute(strSQL)
    conn.close
    set conn = nothing
    %>


    <%
    Name=request.querystring("Name")
    response.cookies("name")=Name
    usrname=request.cookies("name")


    Session("UserAutorised") = True
    %>

    <html><head>
    <title>Thanks for registering !</title>
    </head>

    <body link="black" alink="red" vlink="navy"><center>
    <table border="0" width="73%" bgcolor="#ffffff">
    <tr><tr><tr><tr><tr>
    <td width="50%" bgcolor="#ffffff">
    <font face="verdana" size="2" color="#navy"><br><center><br><br><p><P>
    <br><p><p>Thank You For Registering your details here at madaFM ! <br><p>
    Click <a href="login.html">here</a> to Login!

    <br><p><br><p>
    </font>
    </td>
    </table>

    </html>

    End of Code
    (the html form is on another page!)


    The error msg I get is :

    Error Type:
    Microsoft OLE DB Provider for ODBC Drivers (0x80004005)
    [Microsoft][ODBC Microsoft Access Driver] Operation must use an updateable query.
    /login/register.asp, line 25



    I'm using IIS and MS ACCESS!

    Thanks in advance !

    mada!


Comments

Advertisement