Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.tools -> Re: ProC Mystery
Search for
EXEC SQL WHENEVER NOTFOUND DO break;
somewhere before that INSERT. The line You mentioned was inserted by the
precompiler, which processes WHENEVER statements in their physical order
in the .pc file, so IMHO this error handling was put somewhere in order to
quit
a cursor loop.
Put adequate error handling before Your INSERT, and/or after the loop.
--- Alexander I. Doroshko, Bank "Grant", Kharkov, Ukraine aid_at_grant.kharkov.ua Melissa <mp2114_at_my-deja.com> wrote in message news:8idgmh$qg4$1_at_nnrp1.deja.com...Received on Fri Jun 16 2000 - 00:00:00 CDT
> I am not sure how this is happening, but a co-worker was working on some
> ProC code and had typed a very simple INSERT instruction. After the
> ProC compiler finished generating the corresponding C file, the CC
> compiler indicated a compile error with the following message:
>
> Error 1571: Break statement has no enclosing loop or switch.
>
> The odd thing about this problem is that the ProC compiler has placed a
> line of code at the end stating the following:
>
> if (sqlca.sqlcode == 1403) break;
>
> This line should not even be present in the code. I have looked over
> the code several times and do not see anything wrong with the way the
> INSERT has been coded. To compound the situation further, if the INSERT
> command is commented out of the code, the CC compiler compiles with no
> errors.
>
> Has anyone else seen something similar to this? If so, how were you
> able to resolve the issue? My first suggestion was to take out that
> function in the current file and place it into a new *.pc file, then
> recompile.
>
> Any suggestions anyone could supply would be greatly appreciated!
>
> -- Melissa
>
>
> Sent via Deja.com http://www.deja.com/
> Before you buy.