%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>
<%
Dim rsCategoryBrowse(7)
Dim rsRelatedIDsBrowse(7)
%>
<%
' Check to see if need to build catalog pull down
'Session("CatalogPullDown") = "" ' temp for testing
if Session("CatalogPullDown") = "" then
CatalogPullDown = "
" & vbCRLF
' Start with Main Category
SQLstmt = "SELECT "
SQLstmt = SQLstmt & " category.CategoryID AS RelatedID,"
SQLstmt = SQLstmt & " category.Title AS RelatedTitle"
SQLstmt = SQLstmt & " FROM"
SQLstmt = SQLstmt & " categoryxref"
SQLstmt = SQLstmt & " INNER JOIN category ON categoryxref.RelatedID = category.CategoryID"
SQLstmt = SQLstmt & " WHERE"
SQLstmt = SQLstmt & " categoryxref.CategoryID = 'MAIN' AND"
SQLstmt = SQLstmt & " categoryxref.RelatedIDType = 'C' "
SQLstmt = SQLstmt & " ORDER BY"
SQLstmt = SQLstmt & " categoryxref.Sequence ASC"
set rsMainPullDownCategoryList = Server.CreateObject("ADODB.Recordset")
rsMainPullDownCategoryList.ActiveConnection = OrderDSN
rsMainPullDownCategoryList.Source = SQLstmt
rsMainPullDownCategoryList.CursorType = AdOpenDynamic
rsMainPullDownCategoryList.CursorLocation = adUseClient
rsMainPullDownCategoryList.LockType = AdLockReadOnly
rsMainPullDownCategoryList.Open()
rsMainPullDownCategoryList_numRows = 0
CatalogPullDown = CatalogPullDown & "- Browse our entire catalog
" & vbCRLF
While NOT rsMainPullDownCategoryList.EOF
Sequence = Sequence + 1
RelatedID = rsMainPullDownCategoryList.Fields.Item("RelatedID").value
RelatedTitle = rsMainPullDownCategoryList.Fields.Item("RelatedTitle").value
CatalogPullDown = CatalogPullDown & "- " & RelatedTitle & "" & vbCRLF
' Build secondary level
SQLstmt = "SELECT "
SQLstmt = SQLstmt & " category.CategoryID AS RelatedID,"
SQLstmt = SQLstmt & " category.Title AS RelatedTitle"
SQLstmt = SQLstmt & " FROM"
SQLstmt = SQLstmt & " categoryxref"
SQLstmt = SQLstmt & " INNER JOIN category ON categoryxref.RelatedID = category.CategoryID"
SQLstmt = SQLstmt & " WHERE"
SQLstmt = SQLstmt & " categoryxref.CategoryID = '" & RelatedID & "' AND"
SQLstmt = SQLstmt & " categoryxref.RelatedIDType = 'nothing' "
SQLstmt = SQLstmt & " ORDER BY"
SQLstmt = SQLstmt & " categoryxref.Sequence ASC"
set rsSecondaryPullDownCategoryList = Server.CreateObject("ADODB.Recordset")
rsSecondaryPullDownCategoryList.ActiveConnection = OrderDSN
rsSecondaryPullDownCategoryList.Source = SQLstmt
rsSecondaryPullDownCategoryList.CursorType = AdOpenDynamic
rsSecondaryPullDownCategoryList.CursorLocation = adUseClient
rsSecondaryPullDownCategoryList.LockType = AdLockReadOnly
rsSecondaryPullDownCategoryList.Open()
rsSecondaryPullDownCategoryList_numRows = 0
if NOT rsSecondaryPullDownCategoryList.EOF then
CatalogPullDown = CatalogPullDown & "
" & vbCRLF
While NOT rsSecondaryPullDownCategoryList.EOF
Sequence = Sequence + 1
RelatedID = rsSecondaryPullDownCategoryList.Fields.Item("RelatedID").value
RelatedTitle = rsSecondaryPullDownCategoryList.Fields.Item("RelatedTitle").value
CatalogPullDown = CatalogPullDown & "- " & RelatedTitle & ""
CatalogPullDown = CatalogPullDown & "
" & vbCRLF
rsSecondaryPullDownCategoryList.MoveNext()
Wend
CatalogPullDown = CatalogPullDown & "
" & vbCRLF
rsSecondaryPullDownCategoryList.close
end if
CatalogPullDown = CatalogPullDown & " " & vbCRLF
rsMainPullDownCategoryList.MoveNext()
Wend
rsMainPullDownCategoryList.close
CatalogPullDown = CatalogPullDown & "
" & vbCRLF
Session("CatalogPullDown") = CatalogPullDown
end if
%>
Sign up to receive our newsletter. Learn about our current promotions, and
have tips and project ideas delivered to your in-box!