Wrox Programmer Forums
|
Classic ASP Databases Discuss using ASP 3 to work with data in databases, including ASP Database Setup issues from the old P2P forum on this specific subtopic. See also the book forum Beginning ASP.NET Databases for questions specific to that book. NOT for ASP.NET 1.0, 1.1, or 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Classic ASP Databases section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old January 15th, 2005, 12:08 AM
Authorized User
 
Join Date: Dec 2004
Posts: 31
Thanks: 0
Thanked 0 Times in 0 Posts
Default Unable to display data using drop down list

Hi all, I needed some help on displaying data using drop down list. I'm able to see the drop box. But when i try to select from the list to display the information from access it doesnt show. There is no error but it is unable to display the table.

Here is the form.
<form name="InputForm" method="post">
  <table border="0" cellpadding="5" cellspacing="0" bordercolor="#FFFFFF">
    <tr>
    <td><select name="tEquipmentCode" style="font-size:10px">

    <%
    sSQL = "SELECT EquipmentCode, EquipmentName FROM Equipment ORDER BY EquipmentCode"
    rs.open sSQL, conn, 1, 3
    do while not rs.eof
        %><option value="<%=rs("EquipmentCode")%>" <% if rs("EquipmentCode")=sEquipmentCode then response.Write("selected")%>><%=rs("EquipmentCode" )%> -- <%=rs("EquipmentName")%></option><%
        rs.movenext
    loop
    %>

    </select></td>
<td><input type="submit" value="Add" name="btn_add"></td>
<td><input type="submit" value="Edit" name="btn_edit"></td>
<td><input type="submit" value="Delete" name="btn_delete"></td>
<td><input name="button" type="button" onClick="javascript:window.close()" value="Close"></td>
</tr>
</table>

<table border="1" cellspacing="0" cellpadding="5" width="100%">
<tr>
    <td colspan="5"><b><%=Session("UpdateStatus")%></b></td>
</tr>
<tr>


      <th width="24%" bgcolor="lightgrey">Equipment Code</th>
      <th width="44%" bgcolor="lightgrey">Equipment Item Code</th>
      <th width="12%" bgcolor="lightgrey">Item</th>

</tr>

<%


query_displayEquip = "Select * From EquipmentItem where EquipmentCode='"&sEquipmentCode&"' Order By EquipmentItemCode"
Set rs_displayEquip = Server.CreateObject("ADODB.Recordset")
Set rs_displayEquip = conn.Execute(query_displayEquip)
response.write(selected)

while NOT rs_displayEquip.EOF

%>
<tr>


    <td align="center"><%=rs_displayEquip("EquipmentCode") %></td>
    <td><%=rs_displayEquip("EquipmentItemCode")%></td>
    <td><%=rs_displayEquip("Item")%></td>

</tr>
<%
rs_displayEquip.MoveNext
Wend
%>

</table>
</form>

Pls Help..thanks u all..

 
Old January 15th, 2005, 12:49 AM
Authorized User
 
Join Date: Aug 2004
Posts: 58
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Let me please know how its i displaying now.

Also just take the "view source" option and see if there is any error text in between the html codes. Often, while using select box the error won't be shown on browser.

 
Old January 18th, 2005, 05:36 AM
Authorized User
 
Join Date: Dec 2004
Posts: 31
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi Shibu, I actually changed the format of display now...Thanks anyway! :)






Similar Threads
Thread Thread Starter Forum Replies Last Post
populate a drop list fro a data table greenbriar ADO.NET 2 July 22nd, 2008 10:18 PM
Help Needed - I'm unable to display the Pdf data vnaidu XSLT 1 January 16th, 2008 07:42 AM
Data Grid Drop Down List Column bmains ASP.NET 1.0 and 1.1 Professional 4 September 21st, 2004 08:39 AM
unable to display stored data(asp.net) Abhinav_jain_mca ADO.NET 3 August 3rd, 2004 03:33 AM
Unable to display data ractim ADO.NET 5 July 31st, 2004 04:55 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.