<% ' create the connection to the MS Access database ' the name of the database is wells.mdb set conn=server.createobject("adodb.connection") DSN="DRIVER={Microsoft Access Driver (*.mdb)}; " DSN=DSN & "DBQ=" & server.mappath("wells.mdb") conn.Open DSN '------------------------------------------------ intID=request("id") ' get the category name first strSql=" select CategoryName " & _ " from a_productcategory " & _ " where ID= " & intID set rstemp=conn.execute(strSql) strCat = rstemp(0) ' get all the products strSql=" select ID,CategoryName " & _ " from a_productcategory " & _ " where Parentid= " & intID & _ " order by ID asc " set rstemp=conn.execute(strSql) '------------------------------------------------ %>
 

 

<%=strCat%>

<% intI = 0 do while not rstemp.eof strID = rstemp("ID") strCategoryName = rstemp("CategoryName") if intI=0 then %> <% else %> <% end if %> <% if intI=0 then intI=1 else intI=0 end if rstemp.movenext loop '------------------------------------------------ %>

<%=strCategoryName%>

<%=strCategoryName%>

 
All Copyright reserved 2008-2009 by Wells Plumbing and Heating Supplies