Am I correct that vbScript does not have a command for exiting a While Wend loop? Should I use a Do While Loop instead if I want to have an exit condition? Is there any functional difference that I should be aware of?
I'm looping through record sets like this:
I don't want to force an exit in the While Wend by using rsSomeData.MoveLast because I'm not sure if that will work in all circumstances without generating errors--I'm assuming it's dependent on what kind of cursor is being used.
Will this
accomplish the same thing without surprises?
I'm looping through record sets like this:
Code:
While NOT rsSomeData.EOF
. . . do some stuff . . .
rsSomeData.MoveNext
Wend
I don't want to force an exit in the While Wend by using rsSomeData.MoveLast because I'm not sure if that will work in all circumstances without generating errors--I'm assuming it's dependent on what kind of cursor is being used.
Will this
Code:
Do While NOT rsSomeData.EOF
if somecondition then
exit do
end if
. . . do some stuff . . .
rsSomeData.MoveNext
Loop
accomplish the same thing without surprises?