You want to look into the
TOP(n)[
^] clause of
TSQL[
^].
Here's the idea assuming activityids are only positive integers including zero:
Select the first 100 activity entries:
SELECT TOP(100) *
FROM tblactivity
WHERE activityid > -1
ORDER BY activityid ASC
For the next 100 entries lets assume the last activityid was 155 then you do this:
SELECT TOP(100) *
FROM tblactivity
WHERE activityid > 155
ORDER BY activityid ASC
So you always use the last activityid with the "greater than" relational operator and the TOP(100) clause and your all set and ready to go. When you want to start from the first activity you assume the last activityid was -1.
Regards,
Manfred