page record(for no record syntax)

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • MATTXtwo
    New Member
    • Sep 2006
    • 83

    #1

    page record(for no record syntax)

    guys... I know alittle bit of page record for asp
    which include some of this syntax
    Code:
    rs.CursorLocation=3
    		rs.cachesize=11
    		rs.Open "exec get_reset ", OBJdbConnection,3,3
    		rs.MoveFirst 
    		rs.PageSize=10
    		pagelimit=rs.PageCount
    		 Select Case Request("Action")
    				case "<<"
    					pages	= 1
    				case "<"
    					pages = Request("pages")-1
    					if pages < 1 then pages = 1
    				case ">"
    					pages = Request("pages")+1
    					if pages > pagelimit then pages = pagelimit
    				Case ">>"
    					pages = pagelimit
    				case else
    					pages = 1
    		end select
    
    		rs.AbsolutePage=pages		
    					for intRecord=1 to rs.PageSize 
    				Response.Write "<tr><td>"&rs("Personel_No")&"</td>"
    				Response.Write "<td>"&rs("Nama")&"</td>"
    				Response.Write "<td>"&rs("IC_Baru")&"</td>"
    				Response.Write "<td>"&rs("Date_Request")&"</td></tr>"
    				rs.MoveNext 
    				if rs.EOF then exit for
    			next
    			rs.Close
    			set rs=nothing
    but for no record what i do to not having error on this page
  • DrBunchman
    Recognized Expert Contributor
    • Jan 2008
    • 979

    #2
    HI MATTXtwo,

    Instead of using a For loop could you not use:

    Code:
    Do Until rs.EOF
       'Process your record
       rs.MoveNext
    Loop
    Does this fix the problem? If not, can you say which line is causing the error.

    Dr B

    Comment

    • MATTXtwo
      New Member
      • Sep 2006
      • 83

      #3
      Originally posted by DrBunchman
      HI MATTXtwo,

      Does this fix the problem? If not, can you say which line is causing the error.

      Dr B
      Actually I want to check wether there is a record? and I want to stop the recordset movenext and other stuff...and where to allocate it

      Comment

      Working...