Results 1 to 3 of 3
  1. #1
    Join Date
    Mar 2004

    Unanswered: problem with populating list/menu box..

    Hi all,

    Im fairly new to asp and vbscript respectively and this semester I have a database project to do that requires us to create a shopping cart or close to it. I created a page called game_catalog.asp and everytime I run it, it gives me an error:

    Error Type:
    Microsoft JET Database Engine (0x80040E10)
    No value given for one or more required parameters.
    /game_catalog.asp, line 30

    Here is my code:

    'check session and validate user
    response.expires = -1
    dim custid, pass
    custid = session("member_number")
    pass = session("password")

    dim soundstage, dbpath
    dbpath = server.mappath("dbase/soundstage.mdb")
    set soundstage = server.createobject("ADODB.Connection") "PROVIDER=MICROSOFT.JET.OLEDB.4.0;DATA SOURCE=" & dbpath

    dim findindb, selectfindindb
    selectfindindb = "SELECT password from member_t WHERE member_number = """ & custid & """;"
    set findindb = soundstage.execute(selectfindindb)
    if findindb.eof then
    end if
    if findindb("password") <> pass then
    end if
    'gamelist gathering
    dim game, qselectgame
    qselectgame = "SELECT t_product_number as gnumber, title_of_work as title FROM title_t WHERE t_product_number IN (SELECT DISTINCT t_product_number FROM title_t WHERE EXISTS (SELECT * FROM product_t WHERE product_type <> game AND title_t.t_product_number = product_t.product_number));"
    set game = soundstage.execute(qselectgame)

    Line 30 is "set game = soundstage.execute(qselectgame)"

    Here is the code for my form:

    <form name="select-game" method="post" action="catalog_results.asp">
    <table width="100" border="0">
    <td width="20" height="33"><div align="right">Choose Game:</div></td>
    <td width="20"><select name="gid">
    <%while not game.eof%>
    <%response.write("<option value='" & game("gnumber") & "'>" & game("title")) & " </option>"%>
    <td width="60"><input type="submit" name="Submit" value="Submit"></td>

    Please help this poor newbie.... thanks......

  2. #2
    Join Date
    Oct 2002
    Western part of Georgia, USA
    not sure but try getting rid of the ; in your sql statement

  3. #3
    Join Date
    Mar 2004
    A good way to troubleshoot problems with your SQL statement is to display the statement after the page has compiled. You can do this by writing 'qselectgame' out to the page or storing it in a session variable. I usually store it in a session variable that way if the page errors you have still captured the statement. Then you need a 'displaysessions.asp' page (I can email you the code for this). If you fire up that page you'll be able to see all your session info. Then all you have to do is look at your SQL statement to make sure it's right. You could even copy and paste it into your db and test it out.

    Let me know if you want the displaysession.asp code.

Posting Permissions

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