[I'm still behind with my mail, so please take my spologies if this already
has been answererd.]
On Fri, Apr 21, 2000 at 12:56:29PM -0700, Matthew Denny wrote:
> In my ECPG code, I have a EXEC SQL WHENEVER NOT FOUND DO BREAK
> statement in order to end a cursor fetch loop when the cursor runs out of
> input tuples. Unfortunately, it appears ECPG puts such a conditional
> break statement after every SQL EXEC in the file and then throws an
No, only after statements that may result in NOT FOUND. For instance it is
not set after a cursor close statement.
> error if these subsequent statements are not in a switch or loop
> statement (which most of my INSERT, UPDATE, and DELETE calls are not).
> Thus, I currently have to wrap all my INSERT, UPDATE, and DELETE
> calls in dummy switch statements. Is there a more elegant way
> (e.g. via another EXEC SQL WHENEVER statement) to toggle WHENEVER NOT
> FOUND DO BREAK at different points in the source file? A more elegnt
> solution would be greatly appreciated.
How about WHENEVER NOT FOUND BREAK before the loop and WHENEVER NOT FOUND
CONTINUE after it?
Michael
--
Michael Meskes | Go SF 49ers!
Th.-Heuss-Str. 61, D-41812 Erkelenz | Go Rhein Fire!
Tel.: (+49) 2431/72651 | Use Debian GNU/Linux!
Email: Michael@Fam-Meskes.De | Use PostgreSQL!