tags:

views:

18

answers:

1

Here is a table patients in MS access database, There is 20 records, I want to select first 0 10 records and after 11-20 records for pagination. How to solve this problem

+1  A: 

If it's ok to order your output by primary key you could do something like this:

Select top 10 *
from patients
where patientid > @id

You would need to keep track of the last id shown on the page, sending that to the query every time. This won't work if you sort by something other than the id

David