breaking while loop

Results 1 to 2 of 2

Thread: breaking while loop

  1. #1
    Join Date
    Dec 1969

    Default breaking while loop

    I would like to know how to break out of a while loop, I know in java we uste the keyword break, what would be the keyword in vbscript?<BR><BR>the functions i am writing is the following:<BR><BR>&#039;connection is open before calling this function<BR>function itemExists(sql, item)<BR> exists = false<BR> set rs = objConnection.Execute(sql)<BR> do while not rs.eof<BR> if rs(0)=item then<BR> exists = true<BR> &#039;want to break out of while loop<BR> end if<BR> rs.MoveNext<BR> loop<BR> rs.close<BR> set rs = nothing<BR> end function

  2. #2
    Join Date
    Dec 1969

    Default Exit Do <eop>

    simple as that

Posting Permissions

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