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.

Asp No value given for one or more required parameters.

  • 28-11-2003 04:36PM
    #1
    Registered Users, Registered Users 2 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, Registered Users 2 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