absolute page

Results 1 to 2 of 2

Thread: absolute page

  1. #1
    Join Date
    Dec 1969

    Default absolute page

    I have a result page which retrieves all 1500 records from table. i have used absolute page for paging 10 records per page . But the 10 results to be displayed takes about the same time taken to retrieve 1500 records. Why is this ?<BR><BR>brij

  2. #2
    Join Date
    Dec 1969

    Default RE: absolute page

    The reason for this is that is actually retrieves 1500 records! After it has recieved them it only uses the 10. This is why I never use paging in the recordset object.<BR><BR>You can do that same thing with SQL (don&#039;t think this will work in Access):<BR><BR>pageNum = 3<BR>pageLen = 10<BR><BR>SQL = "SELECT TOP " & pageLen & " * FROM Table WHERE TableID NOT IN (SELECT TOP " & ((pageNum - 1)*pageLen) & " TableID FROM Table ORDER BY YourRow) ORDER BY YourRow"<BR><BR>Notice that your subquery needs to be identical with the main query (SORT BY, etc). This is quite messy with larger tables with lots of joins/etc, but VERY much faster than using the recordset object.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts