cosi?
<%@LANGUAGE="VBSCRIPT"%>
<%
set RsTotali = Server.CreateObject("ADODB.Recordset")
RsTotali.ActiveConnection = MM_cnnAnnunci_STRING
RsTotali.Source = "SELECT * FROM ANNUNCI"
RsTotali.CursorType = 0
RsTotali.CursorLocation = 2
RsTotali.LockType = 3
RsTotali.Open()
RsTotali_numRows = 0
%>
<%
' *** Recordset Stats, Move To Record, and Go To Record: declare stats variables
' set the record count
RsTotali_total = RsTotali.RecordCount
' set the number of rows displayed on this page
If (RsTotali_numRows < 0) Then
RsTotali_numRows = RsTotali_total
Elseif (RsTotali_numRows = 0) Then
RsTotali_numRows = 1
End If
' set the first and last displayed record
RsTotali_first = 1
RsTotali_last = RsTotali_first + RsTotali_numRows - 1
' if we have the correct record count, check the other stats
If (RsTotali_total <> -1) Then
If (RsTotali_first > RsTotali_total) Then RsTotali_first = RsTotali_total
If (RsTotali_last > RsTotali_total) Then RsTotali_last = RsTotali_total
If (RsTotali_numRows > RsTotali_total) Then RsTotali_numRows = RsTotali_total
End If
%>
<%
' *** Recordset Stats: if we don't know the record count, manually count them
If (RsTotali_total = -1) Then
' count the total records by iterating through the recordset
RsTotali_total=0
While (Not RsTotali.EOF)
RsTotali_total = RsTotali_total + 1
RsTotali.MoveNext
Wend
' reset the cursor to the beginning
If (RsTotali.CursorType > 0) Then
RsTotali.MoveFirst
Else
RsTotali.Requery
End If
' set the number of rows displayed on this page
If (RsTotali_numRows < 0 Or RsTotali_numRows > RsTotali_total) Then
RsTotali_numRows = RsTotali_total
End If
' set the first and last displayed record
RsTotali_first = 1
RsTotali_last = RsTotali_first + RsTotali_numRows - 1
If (RsTotali_first > RsTotali_total) Then RsTotali_first = RsTotali_total
If (RsTotali_last > RsTotali_total) Then RsTotali_last = RsTotali_total
End If
%>
ps:cmq nn lo detto io: è uno scherzo?"![]()

Rispondi quotando