I need to write a query as follows which will be bound to a grid
select top 25 * from ErrTable Order by DateErrorad Desc
However, I need to write this query to return only 25 records at a time, but when a user clicks next it will display the next 25 most recent records from the db.
How could I accomplish this?
You can implement a 'paging' technique using ROW_NUMBER() as detailed in this post: http://www.davidhayden.com/blog/dave/archive/2005/12/30/2652.aspx
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With