Re: Need to exit loop early



I have just tested this with a small sample script - and it does exit the "do
loop". However, it exits it completely - what I need is the the loop to
continue looping through all records.

"Björn Holmgren" wrote:

> "Jo Winchester" <JoWinchester@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
> news:B11167CF-A33E-4400-8A42-9FB42B6DABAA@xxxxxxxxxxxxxxxx
> > Hopefully this is a straight forward question.
> >
> > I have a script that reads a file one line at a time, and carries out
> > ceratin actions depending on what it reads on each line. The script uses
> a
> > Do Until....Loop, using
> >
> > Do Until objTextFile.AtEndOfStream
> >
> > Loop
> >
> > I need to add error checking, so that if a set action to be carried out by
> > the script has an err.number <> 0, the loop will ignore the rest of the
> loop,
> > and continue to the next line of the text file that it is reading. So,
> what
> > I need to the command to end one "loop" early, but continue through
> remaining
> > loops. I'm sure it should be really simple, but I don't seem to be able
> to
> > get the syntax right.
>
> Exit Do
>
> --
> Björn Holmgren
>
>
>
>
.



Relevant Pages

  • Need to exit loop early
    ... Hopefully this is a straight forward question. ... I have a script that reads a file one line at a time, ... ceratin actions depending on what it reads on each line. ... the script has an err.number 0, the loop will ignore the rest of the loop, ...
    (microsoft.public.scripting.vbscript)
  • Re: Need to exit loop early
    ... > Hopefully this is a straight forward question. ... > I have a script that reads a file one line at a time, ... > ceratin actions depending on what it reads on each line. ... > the script has an err.number 0, the loop will ignore the rest of the ...
    (microsoft.public.scripting.vbscript)
  • Re: Need to exit loop early
    ... original 'loop' command. ... >> I have a script that reads a file one line at a time, ... >> ceratin actions depending on what it reads on each line. ...
    (microsoft.public.scripting.vbscript)
  • Re: Report in FM 6 or 7
    ... achieve this report format will have to be done via scripting. ... but they will simplify the script and Sort Order. ... End Loop ... The normal 'Dancer' field is used so that if there are more than one ...
    (comp.databases.filemaker)
  • Re: recreate database script not work
    ... I got a script which is supposed to regenerate database systax. ... REM gen_dbse_9.sql ... end loop; ...
    (comp.databases.oracle.server)

Loading