AFAIK this is paging thru recordset. Let me write simple one for you:
<%
Const intPageSize = 10 'this is number of records on one page
Dim intCurrentPage, strQ
Dim intTotalPages, I
If Request("Page") = "" Then
intCurrentPage = 1
Else
intCurrentPage = CInt(Request("Page"))
End If
dim objConn, RS, AppDatabase, SQL, totRec, RS2, totRec2, Author, Blurb, Title, Story, sLad
Set objConn = Server.CreateObject("ADODB.Connection")
Set RS = Server.CreateObject("ADODB.RecordSet")
RS.Cursorlocation = adUseClient
RS.CursorType = adOpenStatic
RS.PageSize = intPageSize
AppDatabase="Driver={SQL Server};DSN=;Server=112.112.112.112;UID=userID;PWD=password"
objConn.Open AppDatabase
Set RS.ActiveConnection=objConn
RS.Open "SELECT * FROM your_table"
If Not(RS.EOF) Then RS.AbsolutePage = intCurrentPage
intTotalPages = RS.PageCount
totRec=RS.RecordCount
If totRec = 0 Then
response.write "No records available"
Else
I=0
do until I = RS.PageSize
I=I+1
response.write RS("Something")
RS.MoveNext
If RS.EOF Then Exit do
loop
RS.Close
objConn.Close
End If
If intCurrentPage > 1 Then %><a href="<%= Request.ServerVariables("SCRIPT_NAME")%>?Page=<%= (intCurrentPage-1)%>">
<b>back</b></a> |<%End If%>Page <%=intCurrentPage%>
out of <%=intTotalPages%> | <%If totRec <> 0 Then
If intCurrentPage <> intTotalPages Then%>| <a href="<%= Request.ServerVariables("SCRIPT_NAME")%>?Page=<%= (intCurrentPage+1)%>><b>forward</b></a& gt;
<%
End If
End If
%>