I would like to add pagination to a table on my ASP web page. All the examples that I can find use recordcount and pagecount properties of the recordset as part of their solution. My site does not support either of these properties, they return a -1 value. I attached a copy of the code that constructs my table. There can be anywhere from 1 to 100's of records depending on the job history requested. Can anyone please point me in the right direction.
You could instead do a single query to get record count, then do a TOP X query with a WHERE that gets the next set maybe based on a date, or the ID, depends how you are sorting it
You're very welcome. I usually handle my pagination by remembering a detail of the last record, such as the OrderDate, CustomerID, whatever you're sorted by, then I make the link to go NEXT as
"... WHERE OrderDate>'" & LastOrderDate & "'"
Going backwards is always a pain. But Alex has a really good tip.
Sorry, only students may add comments.
Click here for more
information on how you can set up an account.
If you are a Visitor, go ahead and post your reply as a
new comment, and we'll move it here for you
once it's approved. Be sure to use the same name and email address.
This thread is now CLOSED. If you wish to comment, start a NEW discussion in
Active Server Pages Forum.
The following is a paid advertisement
Computer Learning Zone is not responsible for any content shown or offers made by these ads.