paging error

Results 1 to 2 of 2

Thread: paging error

  1. #1
    Join Date
    Dec 1969

    Default paging error

    Hi,<BR><BR>My first page is showing the right record but next page is not showing correct records. <BR><BR>This is my code:<BR><BR>Page_Size= 5<BR><BR>If Request.QueryString("page")="" Then<BR> Current_Page = 1<BR> Else<BR> Current_Page = CInt(Request("page"))<BR>End If<BR><BR>objRs.CursorLocation = adUseClient<BR>objRs.PageSize = Page_Size<BR>objRs.CacheSize= Page_Size<BR>&#039;SQL statment<BR> objRs.Open SQL, objConn, adCmdText<BR><BR> If objRs.RecordCount = 0 Then<BR> Response.Write "Sorry, there is no record found."<BR> Else<BR><BR>Page_Count = objRs.PageCount<BR><BR>If Current_Page &#062; Page_Count Then <BR> Current_Page = Page_Count<BR>End If<BR> objRs.AbsolutePage = Current_Page<BR><BR>Do While objRs.AbsolutePage = Current_Page And Not objRs.EOF <BR><BR>&#039;Display the data<BR> objRs.MoveNext<BR> Loop<BR><BR>For i= 1 to objRs.PageCount<BR>Response.Write "&#060;td&#062;&#060;a href=search.asp?page=" & i & "&#062;" & i & "&#060;/a&#062;&#060;/td&#062;"<BR>next<BR><BR>Can somebody tell me what I am doing wrong here??<BR>THNAKS.<BR><BR><BR><BR>

  2. #2
    Join Date
    Dec 1969
    Los Angeles, CA

    Default Just use the example on <eop>


Posting Permissions

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