%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>
<%
Dim RScategory__MMColParam
RScategory__MMColParam = "Sealers"
If (Request.QueryString("cat") <> "") Then
RScategory__MMColParam = Request.QueryString("cat")
End If
%>
<%
Dim RScategory
Dim RScategory_numRows
Set RScategory = Server.CreateObject("ADODB.Recordset")
RScategory.ActiveConnection = "Provider=Microsoft.Jet.OLEDB.4.0; Data Source = "& Server.MapPath("database/products.mdb")
RScategory.Source = "SELECT ProductName, ProductDescription, ProductDescription2, Proddesc3, CategoryName, image FROM Products WHERE CategoryName = '" + Replace(RScategory__MMColParam, "'", "''") + "' ORDER BY ProductName ASC"
RScategory.CursorType = 0
RScategory.CursorLocation = 2
RScategory.LockType = 3
RScategory.Open
RScategory_numRows = 0
%>
<%
Dim Repeat1__numRows
Repeat1__numRows = -1
Dim Repeat1__index
Repeat1__index = 0
RScategory_numRows = RScategory_numRows + Repeat1__numRows
%>
<%
' *** Recordset Stats, Move To Record, and Go To Record: declare stats variables
' set the record count
RScategory_total = RScategory.RecordCount
' set the number of rows displayed on this page
If (RScategory_numRows < 0) Then
RScategory_numRows = RScategory_total
Elseif (RScategory_numRows = 0) Then
RScategory_numRows = 1
End If
' set the first and last displayed record
RScategory_first = 1
RScategory_last = RScategory_first + RScategory_numRows - 1
' if we have the correct record count, check the other stats
If (RScategory_total <> -1) Then
If (RScategory_first > RScategory_total) Then RScategory_first = RScategory_total
If (RScategory_last > RScategory_total) Then RScategory_last = RScategory_total
If (RScategory_numRows > RScategory_total) Then RScategory_numRows = RScategory_total
End If
%>
<%
' *** Recordset Stats: if we don't know the record count, manually count them
If (RScategory_total = -1) Then
' count the total records by iterating through the recordset
RScategory_total=0
While (Not RScategory.EOF)
RScategory_total = RScategory_total + 1
RScategory.MoveNext
Wend
' reset the cursor to the beginning
If (RScategory.CursorType > 0) Then
RScategory.MoveFirst
Else
RScategory.Requery
End If
' set the number of rows displayed on this page
If (RScategory_numRows < 0 Or RScategory_numRows > RScategory_total) Then
RScategory_numRows = RScategory_total
End If
' set the first and last displayed record
RScategory_first = 1
RScategory_last = RScategory_first + RScategory_numRows - 1
If (RScategory_first > RScategory_total) Then RScategory_first = RScategory_total
If (RScategory_last > RScategory_total) Then RScategory_last = RScategory_total
End If
%>