%@LANGUAGE="VBSCRIPT"%>
<%
' *** Recordset Stats, Move To Record, and Go To Record: declare stats variables
' set the record count
rs_search_total = rs_search.RecordCount
' set the number of rows displayed on this page
If (rs_search_numRows < 0) Then
rs_search_numRows = rs_search_total
Elseif (rs_search_numRows = 0) Then
rs_search_numRows = 1
End If
' set the first and last displayed record
rs_search_first = 1
rs_search_last = rs_search_first + rs_search_numRows - 1
' if we have the correct record count, check the other stats
If (rs_search_total <> -1) Then
If (rs_search_first > rs_search_total) Then rs_search_first = rs_search_total
If (rs_search_last > rs_search_total) Then rs_search_last = rs_search_total
If (rs_search_numRows > rs_search_total) Then rs_search_numRows = rs_search_total
End If
%>
<%
' *** Recordset Stats: if we don't know the record count, manually count them
If (rs_search_total = -1) Then
' count the total records by iterating through the recordset
rs_search_total=0
While (Not rs_search.EOF)
rs_search_total = rs_search_total + 1
rs_search.MoveNext
Wend
' reset the cursor to the beginning
If (rs_search.CursorType > 0) Then
rs_search.MoveFirst
Else
rs_search.Requery
End If
' set the number of rows displayed on this page
If (rs_search_numRows < 0 Or rs_search_numRows > rs_search_total) Then
rs_search_numRows = rs_search_total
End If
' set the first and last displayed record
rs_search_first = 1
rs_search_last = rs_search_first + rs_search_numRows - 1
If (rs_search_first > rs_search_total) Then rs_search_first = rs_search_total
If (rs_search_last > rs_search_total) Then rs_search_last = rs_search_total
End If
%>
Capital Residence | Commission Free Property Sales | Sell my home with
Capital Residence