Results 1 to 2 of 2

Thread: iteration

  1. #1
    Join Date
    Dec 1969

    Default iteration

    is it possible to have 2 conditions in a do-while loop in asp? <BR><BR>im trying to stop the same loop at either <BR>Do While rst.EOF = False<BR>or when it runs through 5 records. is there a way to be like <BR><BR>Do While rst.EOF = False or iteration &#060; 5<BR><BR>

  2. #2
    Join Date
    Dec 1969

    Default Yes

    but I think a better way is to check for a recordcount first. If its less than 5, skip the work of the loop, else use the AbsolutePosition property of the recordset object.<BR><BR>Note that you cant use AbsolutePosition without using a client side cursor. If you need server side, then use the loop...<BR><BR>Do until rs.AbsolutePosition = 5<BR> stuff<BR>rs.Movenext<BR>Loop

Posting Permissions

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