how 2 get out of a loop

Results 1 to 3 of 3

Thread: how 2 get out of a loop

  1. #1
    Darkness Guest

    Default how 2 get out of a loop

    i got following<BR>---------------<BR>Counter=0<BR>while not oRS.EOF<BR>counter=counter+1<BR>response.write ors("Message")<BR><BR>oRS.movenext <BR>wend<BR>--------<BR>i want only the first 10 messages to be displayed..<BR>however if i put the code<BR>if counter &#060;10 then<BR> oRS.movenext<BR> wend<BR>else<BR>-----<BR>but then i get the wend ( instruction needed)<BR>error.<BR>is is possible in ASP like in basic to get<BR>the Goto or gosub statement, if yes<BR>how can i define the jump<BR>or does anybody has a different solution

  2. #2
    James W. Guest

    Default Exit Loop or Exit For

    Use do while, loop, exit do<BR>or <BR>for,next, exit for

  3. #3
    Reggie Guest

    Default RE: how 2 get out of a loop

    Change you while condition to "while not oRS.EOF AND counter&#060;10"

Posting Permissions

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