James
  I would strongly suggest using the "break" to stop the while loop and
then check about returning to the form. The other thing is if you are
returning to the form take a hard look at "clear all variables" this
could be dangerous if you have variables defined in your form. 

Buddy

-----Original Message-----
From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf Of James
Hageman
Sent: Friday, August 05, 2005 2:58 PM
To: RBG7-L Mailing List
Subject: [RBG7-L] - exiting a WHILE loop in an eep

The following code runs with no errors but I am wondering if it's
Kosher.
Specificaly if vescape = 't' and I return to the form that calls the eep
in the middle of the while loop is that going to cause problems for me
later?

----------------------------------------------------------------
--other code blah blah
--
DECLARE c1 SCROLL CURSOR FOR SELECT ...
OPEN c1
WHILE SQLCODE <> 100 THEN
  FETCH c1 INTO ...
  IF SQLCODE = 100 THEN
    BREAK
  ENDIF
  INSERT INTO ...
  EDIT USING ...

  IF vescape = 'T' THEN
    CLEAR ALL V
    DROP CURSOR c1
    RETURN         <-- THIS OK?
  ENDIF

ENDWHILE
DROP CURSOR c1

--other code follows that I don't want run if VAR vescape = 'T'
...
...
...
return
--eof---------------------------------------------------------

Reply via email to