How do i.e. row 1-10 in a table?

Results 1 to 2 of 2

Thread: How do i.e. row 1-10 in a table?

  1. #1
    Claes Guest

    Default How do i.e. row 1-10 in a table?

    Hi,<BR><BR>How do I select some rows from a table when I don&#039t have<BR>a certain criteria of the contents in any column? I have a<BR>fairly big database, and I want to list i.e. row 1-20 on the<BR>first page, then when clicking on next, row 21-40, etc. <BR><BR>I have figured out how to count the number of rows (SELECT <BR>COUNT(*) FROM tablename), but how do I select just a few <BR>rows at a time?<BR><BR>Btw, I only have read-access to the database, so please don&#039t<BR>suggest me to add more tables or write any stored procedures. Pure SQL and I&#039ll be happy.<BR><BR><BR>Claes

  2. #2
    Join Date
    Dec 1969

    Default RE: How do i.e. row 1-10 in a table?

    Hi,<BR>the simple way is to use the recordset properties that is<BR>recordset.pagecount,recordset.pagesize and recordset.absolutpage.<BR>in your case u can set the pagesize as 20. set the recordset.absolutpage =1 by default, so increamnt this number dynamically so that when you clikc the next button recordset.absolutpage will be assined as 2 and so the recordset wil start from row 21 to 40 !

Posting Permissions

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