Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.tools -> Re: ProC Mystery

Re: ProC Mystery

From: Alexander I. Doroshko <aid_at_grant.kharkov.ua>
Date: 2000/06/16
Message-ID: <8ie0dg$rnr@grant.grant.UUCP>#1/1

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...

> 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.
Received on Fri Jun 16 2000 - 00:00:00 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US