Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie

Asp No value given for one or more required parameters.

Options
  • 28-11-2003 4:36pm
    #1
    Registered Users Posts: 446 ✭✭


    I've read through my code a gazillion times and cant find the error? I think its the Sql although I'm a beginner and cant see anything wrong can you?

    ******************************************************************
    <html>
    <head>
    <title>Ass2</title>
    </head>
    <body>
    <Form Action=Ass2.asp>
    <table border="1" width="892">
    <tr>
    <td width="882">
    <p align="center"><select size="1" name="Choices">
    <option>All</option>
    <option>Green</option>
    <option>Cons</option>
    <option>Liberal</option>
    <option>SDP</option>
    <option>Green</option>
    <option>Ind</option>
    </select></p>
    <input type="submit" name="submit" value="Sort">
    </td>
    </tr>
    <%
    Set oConn = Server.CreateObject ("ADODB.Connection")
    oConn.Provider = "Microsoft.Jet.OLEDB.4.0"
    oConn.open (Server.Mappath("\csm3files\Election.mdb"))
    Set Result = Server.CreateObject ("ADODB.Recordset")

    X=request.querystring("Choices")
    if not X = "All" and not X= "" then
    SQL="Select * FROM candidate where Choices='" & X & "'"
    else
    SQL="Select * FROM candidate"
    end if
    set Result1 = oConn.execute(SQL) <----This line HERE has the error
    Do while not Result1.Eof
    %>

    <tr>
    <td width="882">

    <tr>
    <td><%=Result1(0)%></td>
    <td><%=Result1(1)%></td>
    <td><%=Result1(2)%></td>
    <td><%=Result1(3)%></td>
    <td><%=Result1(4)%></td>
    <%
    Result1.movenext
    loop
    %>
    </tr>

    </td>
    </tr>
    </table>
    </Form>
    </body>
    </html>

    Thanking You






    ww) ww)


Comments

  • Registered Users Posts: 446 ✭✭kegan5


    fear not everyone panacking there! I worked it out...erm I stupidly had the name of my drop down box instead of table name! <---stoopid!


Advertisement