%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%> <% Dim rcl Dim rcl_numRows Set rcl = Server.CreateObject("ADODB.Recordset") rcl.ActiveConnection = MM_puntuacio08_STRING rcl.Source = "SELECT distinct Cat FROM ResultatsCircuit08" rcl.CursorType = 0 rcl.CursorLocation = 2 rcl.LockType = 1 rcl.Open() rcl_numRows = 0 %> <% Dim rl__CAT rl__CAT = "Juvenil fem" If (Request.Form("busca") <> "") Then rl__CAT = Request.Form("busca") End If %> <% Dim rl Dim rl_numRows Set rl = Server.CreateObject("ADODB.Recordset") rl.ActiveConnection = MM_puntuacio08_STRING rl.Source = "SELECT * FROM ResultatsCircuit08 WHERE Cat='" + Replace(rl__CAT, "'", "''") + "' ORDER BY PC" rl.CursorType = 0 rl.CursorLocation = 2 rl.LockType = 1 rl.Open() rl_numRows = 0 %> <% ' *** Recordset Stats, Move To Record, and Go To Record: declare stats variables Dim rl_total Dim rl_first Dim rl_last ' set the record count rl_total = rl.RecordCount ' set the number of rows displayed on this page If (rl_numRows < 0) Then rl_numRows = rl_total Elseif (rl_numRows = 0) Then rl_numRows = 1 End If ' set the first and last displayed record rl_first = 1 rl_last = rl_first + rl_numRows - 1 ' if we have the correct record count, check the other stats If (rl_total <> -1) Then If (rl_first > rl_total) Then rl_first = rl_total End If If (rl_last > rl_total) Then rl_last = rl_total End If If (rl_numRows > rl_total) Then rl_numRows = rl_total End If End If %> <% ' *** Move To Record and Go To Record: declare variables Dim MM_rs Dim MM_rsCount Dim MM_size Dim MM_uniqueCol Dim MM_offset Dim MM_atTotal Dim MM_paramIsDefined Dim MM_param Dim MM_index Set MM_rs = rl MM_rsCount = rl_total MM_size = rl_numRows MM_uniqueCol = "" MM_paramName = "" MM_offset = 0 MM_atTotal = false MM_paramIsDefined = false If (MM_paramName <> "") Then MM_paramIsDefined = (Request.QueryString(MM_paramName) <> "") End If %> <% ' *** Move To Record: update recordset stats ' set the first and last displayed record rl_first = MM_offset + 1 rl_last = MM_offset + MM_size If (MM_rsCount <> -1) Then If (rl_first > MM_rsCount) Then rl_first = MM_rsCount End If If (rl_last > MM_rsCount) Then rl_last = MM_rsCount End If End If ' set the boolean used by hide region to check if we are on the last record MM_atTotal = (MM_rsCount <> -1 And MM_offset + MM_size >= MM_rsCount) %> <% ' *** Recordset Stats: if we don't know the record count, manually count them If (rl_total = -1) Then ' count the total records by iterating through the recordset rl_total=0 While (Not rl.EOF) rl_total = rl_total + 1 rl.MoveNext Wend ' reset the cursor to the beginning If (rl.CursorType > 0) Then rl.MoveFirst Else rl.Requery End If ' set the number of rows displayed on this page If (rl_numRows < 0 Or rl_numRows > rl_total) Then rl_numRows = rl_total End If ' set the first and last displayed record rl_first = 1 rl_last = rl_first + rl_numRows - 1 If (rl_first > rl_total) Then rl_first = rl_total End If If (rl_last > rl_total) Then rl_last = rl_total End If End If %> <% Dim Repeat1__numRows Dim Repeat1__index Repeat1__numRows = 800 Repeat1__index = 0 rl_numRows = rl_numRows + Repeat1__numRows %>
|
||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||