% Dim rsC Dim rsC_numRows Set rsC = Server.CreateObject("ADODB.Recordset") rsC.ActiveConnection = MM_Asun07_STRING rsC.Source = "SELECT distinct Club FROM ResultatsMitja09" rsC.CursorType = 0 rsC.CursorLocation = 2 rsC.LockType = 1 rsC.Open() rsC_numRows = 0 %> <% Dim rsd__BAT rsd__BAT = "C. A. Dianium" If (Request.QueryString("busca") <> "") Then rsd__BAT = Request.QueryString("busca") End If %> <% Dim rsd Dim rsd_numRows Set rsd = Server.CreateObject("ADODB.Recordset") rsd.ActiveConnection = MM_asun07_STRING rsd.Source = "SELECT * FROM ResultatsMitja09 WHERE ResultatsMitja09.Club='" + Replace(rsd__BAT, "'", "''") + "' ORDER BY T" rsd.CursorType = 0 rsd.CursorLocation = 2 rsd.LockType = 1 rsd.Open() rsd_numRows = 0 %> <% ' *** Recordset Stats, Move To Record, and Go To Record: declare stats variables Dim rsd_total Dim rsd_first Dim rsd_last ' set the record count rsd_total = rsd.RecordCount ' set the number of rows displayed on this page If (rsd_numRows < 0) Then rsd_numRows = rsd_total Elseif (rsd_numRows = 0) Then rsd_numRows = 1 End If ' set the first and last displayed record rsd_first = 1 rsd_last = rsd_first + rsd_numRows - 1 ' if we have the correct record count, check the other stats If (rsd_total <> -1) Then If (rsd_first > rsd_total) Then rsd_first = rsd_total End If If (rsd_last > rsd_total) Then rsd_last = rsd_total End If If (rsd_numRows > rsd_total) Then rsd_numRows = rsd_total End If End If %> <% ' *** Recordset Stats: if we don't know the record count, manually count them If (rsd_total = -1) Then ' count the total records by iterating through the recordset rsd_total=0 While (Not rsd.EOF) rsd_total = rsd_total + 1 rsd.MoveNext Wend ' reset the cursor to the beginning If (rsd.CursorType > 0) Then rsd.MoveFirst Else rsd.Requery End If ' set the number of rows displayed on this page If (rsd_numRows < 0 Or rsd_numRows > rsd_total) Then rsd_numRows = rsd_total End If ' set the first and last displayed record rsd_first = 1 rsd_last = rsd_first + rsd_numRows - 1 If (rsd_first > rsd_total) Then rsd_first = rsd_total End If If (rsd_last > rsd_total) Then rsd_last = rsd_total End If End If %> <% Dim Repeat1__numRows Dim Repeat1__index Repeat1__numRows = 305 Repeat1__index = 0 rsd_numRows = rsd_numRows + Repeat1__numRows %>
![]() |
|||||||||||||||||||
|
|||||||||||||||||||