[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 Meskes | Go SF 49ers!
Th.-Heuss-Str. 61, D-41812 Erkelenz | Go Rhein Fire!
Tel.: (+49) 2431/72651 | Use Debian GNU/Linux!
Email: Michael(at)Fam-Meskes(dot)De | Use PostgreSQL!
pgsql-interfaces by date
|Next:||From: Michael Meskes||Date: 2000-05-02 09:24:07|
|Subject: Re: NOTICE: BeginTransactionBlock and not in default|
|Previous:||From: Peter Mount||Date: 2000-05-02 08:11:08|
|Subject: RE: [HACKERS] Request for 7.0 JDBC status|