Paging through Recordset problem

Results 1 to 3 of 3

Thread: Paging through Recordset problem

  1. #1
    Join Date
    Dec 1969

    Default Paging through Recordset problem

    i have seen lots of scripts for paging through recordsets including one on this site. these scripts are good for predetermined SQL values as it will page okay. If you post a variable to the SQL statement though, once you have paged past the first page it forgets the variable and just pages through the whole database. Please does anyone have any ideas or examples.

  2. #2
    Jim Rudnick Guest

    Default RE: Paging through Recordset problem

    Hello Ben...<BR>Yup, you&#039;re right. I&#039;m facing the same problems, in that my SQL querys (there&#039;s over 40 of these vars) all sit above the paged results on the same page. <BR><BR>Once the first paged results display, and I click on the bottom nav buttons (like NEXT for instance) the page redisplays --&#039;cept I get the error message that it can&#039;t find the previous recordset.<BR><BR>Hmm...anyone else out there have an answer? Must I somehow take that recordset, and move to a seperate page to display, rather than attempt to show same from the same asp page time after time?

  3. #3
    Join Date
    Dec 1969

    Default RE: Paging through Recordset problem

    Gentlemen,<BR><BR>The Way I have Addressed this issue for myself is simply having the NEXT and PREV buttons on the bottom of the page be submit buttons for a form. All the (40) vars [in my case 15] are simply placed into hidden fields on the bottom of the page and simply submitting the form to itself. Then simply retrn the records I need based upon the submited values..<BR><BR>Quick Example....<BR>Return all the records based upon what page it is on.<BR> [pageNum = Request.Form("pageNum")]<BR> [if pageNum = "" then pageNum = 1]<BR>Now simply have your buttons send the appropriate value<BR> [&#060;input type="submit" name="Next" value="&#060;%= pageNum+1 %&#062;"&#062;]<BR> [&#060;input type="submit" name="Prev" value="&#060;%= pageNum-1 %&#062;"&#062;]<BR><BR>This should lead you in the right direction....<BR>

Posting Permissions

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