Need help with paging trough a recordset

Results 1 to 2 of 2

Thread: Need help with paging trough a recordset

  1. #1
    Join Date
    Dec 1969

    Default Need help with paging trough a recordset

    I am trying to search trough a database and then display the results by 10 records. The first page works fine, but when i want to display the next 10 records, an error occurres. No matter what i try, it keeps popping up. I wonder whats the problem and how can i fix it. <BR><BR>It seems to be a problem with this line:<BR><BR>mypage=request.querystring("whichpage ")<BR>If mypage="" then<BR> mypage=1<BR>end if<BR>mypagesize=request.querystring("pagesize")<B R>If mypagesize="" then<BR> mypagesize=10<BR>end if<BR>mySQL=request.querystring("SQLquery")<BR>IF mySQL="" THEN<BR> mySQL=SQLtemp<BR>END IF<BR> <BR>Dim rstemp<BR>set rstemp=Server.CreateObject("ADODB.Recordset")<BR>r stemp.cursorlocation=aduseclient<BR>rstemp.cachesi ze=5<BR> sqltemp, connectme <BR>rstemp.movefirst<BR>rstemp.pagesize=mypagesize <BR>maxrecs=cint(rstemp.pagesize)<BR>maxpages=cint (rstemp.pagecount)<BR>rstemp.absolutepage=mypage<B R>howmanyrecs=0<BR>howmanyfields= rstemp.fields.count -1<BR><BR>response.write "Page " & mypage & " of " & maxpages & "<BR>"<BR>response.write "&#060;table border=&#039 1&#039&#062;&#060;tr&#062;"<BR><BR>&#039Put Headings On The Table of Field Names<BR>FOR i=0 to howmanyfields<BR><BR>ADODB.Recordset error &#039 800a0bb9&#039, i don&#039t no what to do anymore. <BR>The error is in the line " sqltemp, connectme" I am using a disconnect recordset.<BR>And im using a form in the same page. I am using an well know sample for paging from Jeff Emrich.<BR><BR>Hope someone can help me.........<BR><BR>

  2. #2
    webber Guest

    Default RE: Need help with paging trough a recordset

    If you&#039re having trouble with an example script you should go back to the author. <BR><BR>where&#039s Jeff?

Posting Permissions

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