Well there are a couple different ways this can be accomplished in ASP, but of course none of them are as easy as it is in ASP.Net. One way to accomplish this is to create a variable that will hold the number of records you want in your page, then as you're looping through your Recordset you make sure you're not at the end of the file and that you havent exceeded your counter variable.
To accomplish this you're going to need to read up on the
AbsolutePage Property of the Recordset Object and the
PageSize Property of the same object.
When setting the
AbsolutePage and
PageSize Property do something like this:
vb
Set rs = Server.CreateObject("ADODB.Recordset")
With rs
.CursorType = adOpenStatic
.PageSize = 10
.Open "SELECT JobTitle,URL FROM Jobs ORDER BY TimeStamp DESC", cnn
.AbsolutePage = Cint(pageNum) ' This is the variable you'll create to hold the page number you're on
End With
Once you've set the
PageSize Property you can then use that when creating your links, something like this:
vb
'row is a variable you create to keep track of the
'number of records being created in your loop
While Not rs.EOF And row < rs.PageSize
Response.Write "<a href='" & rs("URL") & "'>" & rs("JobTitle") & "</a><br>"
row = row + 1
rs.MoveNext
Wend
NOTE: To use an example like I've shown you're going to need the
ADOVBS includes file, which contains the constants you're going to need when creating your paging system.
Hope that helps