%
'Get the manufacturer's name
SQL = "SELECT * FROM tblABB WHERE Abb = '" + Replace(Request("manuf"), "'", "''") + "'"
set rs=server.createobject("ADODB.recordset")
rs.open SQL,conn
manufName = ""
if not rs.eof then
manufName = rs.Fields.Item("Manufacturer").Value
end if
'Get all the parts for this manufacturer
SQL = "SELECT * FROM tblOEMParts WHERE Abb = '" + Replace(Request("manuf"), "'", "''") + "' ORDER BY [Order]"
set rs=server.createobject("ADODB.recordset")
'Set how many records per page we want
Const NumPerPage =20
'Set the cursor location property
RS.CursorLocation = 3
'Set the cache size = to the # of records/page
RS.CacheSize = NumPerPage
'Retrieve what page we're currently on
If Request("CurPage") = "" then
CurPage = 1 'We're on the first page
Elseif Request("CurPage") <> "" then
CurPage = Request("CurPage")
End If
rs.open SQL,conn
If not (RS.EOF) then
flag = true 'indicates to show next/prev buttons
RS.MoveFirst
RS.PageSize = NumPerPage
'Get the max number of pages
TotalPages = RS.PageCount
'Set the absolute page
RS.AbsolutePage = CurPage
else
flag = false
end if
%>
<%
Dim Repeat1__numRows
Repeat1__numRows = -1
Dim Repeat1__index
Repeat1__index = 0
rs_numRows = rs_numRows + Repeat1__numRows
%>
<%
' *** Go To Record and Move To Record: create strings for maintaining URL and Form parameters
' create the list of parameters which should not be maintained
MM_removeList = "&index="
If (MM_paramName <> "") Then MM_removeList = MM_removeList & "&" & MM_paramName & "="
MM_keepURL="":MM_keepForm="":MM_keepBoth="":MM_keepNone=""
' add the URL parameters to the MM_keepURL string
For Each Item In Request.QueryString
NextItem = "&" & Item & "="
If (InStr(1,MM_removeList,NextItem,1) = 0) Then
MM_keepURL = MM_keepURL & NextItem & Server.URLencode(Request.QueryString(Item))
End If
Next
' add the Form variables to the MM_keepForm string
For Each Item In Request.Form
NextItem = "&" & Item & "="
If (InStr(1,MM_removeList,NextItem,1) = 0) Then
MM_keepForm = MM_keepForm & NextItem & Server.URLencode(Request.Form(Item))
End If
Next
' create the Form + URL string and remove the intial '&' from each of the strings
MM_keepBoth = MM_keepURL & MM_keepForm
if (MM_keepBoth <> "") Then MM_keepBoth = Right(MM_keepBoth, Len(MM_keepBoth) - 1)
if (MM_keepURL <> "") Then MM_keepURL = Right(MM_keepURL, Len(MM_keepURL) - 1)
if (MM_keepForm <> "") Then MM_keepForm = Right(MM_keepForm, Len(MM_keepForm) - 1)
' a utility function used for adding additional parameters to these strings
Function MM_joinChar(firstItem)
If (firstItem <> "") Then
MM_joinChar = "&"
Else
MM_joinChar = ""
End If
End Function
%>
United Contact (1985) Inc. :: Online Catalogue