home *** CD-ROM | disk | FTP | other *** search
- <HTML>
- <%
- ReqCategory=Request.QueryString("CategoryID")
- ReqName=Request.QueryString("CategoryName")
- Set DBObj = Server.CreateObject("ADODB.Connection")
- DBObj.Open "NWindDB"
- SQLQuery = "SELECT ProductName, UnitPrice, UnitsInStock FROM Products WHERE CategoryID = " & ReqCategory & " ORDER BY ProductName"
- Set RSProducts = DBObj.Execute(SQLQuery)
- %>
-
- <CENTER>
- <H1>Query Results</H1>
- <H3>List of products in category <% = ReqName %></H3>
- </CENTER>
-
- <TABLE>
- <% Do While Not RSProducts.EOF %>
- <TR>
- <TD> <FONT FACE="Verdana" SIZE=2>
- <% = RSProducts("ProductName") & " (" & RSProducts("UnitPrice") & ")" %>
- </FONT></TD>
- <TD><FONT FACE="Verdana" SIZE=2>
- <% = RSProducts("UnitsInStock") %>
- </FONT></TD>
- </TR>
-
- <%
- RSProducts.MoveNext
- Loop
- %>
- </TABLE>
- </HTML>