<% Cat = Request.QueryString("cat") If Cat <> "" then 'Get the catalog SubCat = Request.QueryString("sub") 'Initialize the recordset Set oRS = Server.CreateObject("ADODB.RecordSet") 'Filter the record set SQL ="SELECT * FROM Category WHERE CategoryDisplay = '1' AND ParentID='" & Cat & "' ORDER BY CategoryRanking, CategoryDescription" 'Note that products is a view!!!! 'Open the recordset oRS.Open SQL, oConn If oRS.Eof = False Then Response.Write "
" If Len(SubCat) < 1 then SubCat = oRS("CategoryID") End If Do until oRS.EOF If cstr(oRS("CategoryID")) = SubCat then %>  " style="text-decoration: none;"><%=oRS("CategoryDescription")%>  <% Else %>  "><%=oRS("CategoryDescription")%>  <% End If oRS.MoveNext If oRS.EOF = False then Response.Write "|" Else Response.Write "
" End If Loop End If Set oRS = Nothing End If %>