<%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%> <% ' *** Recordset Stats, Move To Record, and Go To Record: declare stats variables Dim Galeria_total Dim Galeria_first Dim Galeria_last ' set the record count Galeria_total = Galeria.RecordCount ' set the number of rows displayed on this page If (Galeria_numRows < 0) Then Galeria_numRows = Galeria_total Elseif (Galeria_numRows = 0) Then Galeria_numRows = 1 End If ' set the first and last displayed record Galeria_first = 1 Galeria_last = Galeria_first + Galeria_numRows - 1 ' if we have the correct record count, check the other stats If (Galeria_total <> -1) Then If (Galeria_first > Galeria_total) Then Galeria_first = Galeria_total End If If (Galeria_last > Galeria_total) Then Galeria_last = Galeria_total End If If (Galeria_numRows > Galeria_total) Then Galeria_numRows = Galeria_total End If End If %> <% ' *** Recordset Stats: if we don't know the record count, manually count them If (Galeria_total = -1) Then ' count the total records by iterating through the recordset Galeria_total=0 While (Not Galeria.EOF) Galeria_total = Galeria_total + 1 Galeria.MoveNext Wend ' reset the cursor to the beginning If (Galeria.CursorType > 0) Then Galeria.MoveFirst Else Galeria.Requery End If ' set the number of rows displayed on this page If (Galeria_numRows < 0 Or Galeria_numRows > Galeria_total) Then Galeria_numRows = Galeria_total End If ' set the first and last displayed record Galeria_first = 1 Galeria_last = Galeria_first + Galeria_numRows - 1 If (Galeria_first > Galeria_total) Then Galeria_first = Galeria_total End If If (Galeria_last > Galeria_total) Then Galeria_last = Galeria_total End If End If %> ABQM - Brazilian Quarter Horse Association