<%
Dim Recordset69
Dim Recordset69_numRows
Set Recordset69 = Server.CreateObject("ADODB.Recordset")
Recordset69.ActiveConnection = MM_connetti3_STRING
Recordset69.Source = "SELECT ID, titolo, data FROM Sql178806_1.eventi"
Recordset69.CursorType = 0
Recordset69.CursorLocation = 2
Recordset69.LockType = 1
Recordset69.Open()
Recordset69_numRows = 0
%>
<%
' *** Recordset Stats, Move To Record, and Go To Record: declare stats variables
Dim Recordset69_total
Dim Recordset69_first
Dim Recordset69_last
' set the record count
Recordset69_total = Recordset69.RecordCount
' set the number of rows displayed on this page
If (Recordset69_numRows < 0) Then
Recordset69_numRows = Recordset69_total
Elseif (Recordset69_numRows = 0) Then
Recordset69_numRows = 1
End If
' set the first and last displayed record
Recordset69_first = 1
Recordset69_last = Recordset69_first + Recordset69_numRows - 1
' if we have the correct record count, check the other stats
If (Recordset69_total <> -1) Then
If (Recordset69_first > Recordset69_total) Then
Recordset69_first = Recordset69_total
End If
If (Recordset69_last > Recordset69_total) Then
Recordset69_last = Recordset69_total
End If
If (Recordset69_numRows > Recordset69_total) Then
Recordset69_numRows = Recordset69_total
End If
End If
%>
<%
' *** Recordset Stats: if we don't know the record count, manually count them
If (Recordset69_total = -1) Then
' count the total records by iterating through the recordset
Recordset69_total=0
While (Not Recordset69.EOF)
Recordset69_total = Recordset69_total + 1
Recordset69.MoveNext
Wend
' reset the cursor to the beginning
If (Recordset69.CursorType > 0) Then
Recordset69.MoveFirst
Else
Recordset69.Requery
End If
' set the number of rows displayed on this page
If (Recordset69_numRows < 0 Or Recordset69_numRows > Recordset69_total) Then
Recordset69_numRows = Recordset69_total
End If
' set the first and last displayed record
Recordset69_first = 1
Recordset69_last = Recordset69_first + Recordset69_numRows - 1
If (Recordset69_first > Recordset69_total) Then
Recordset69_first = Recordset69_total
End If
If (Recordset69_last > Recordset69_total) Then
Recordset69_last = Recordset69_total
End If
End If
%>