Help With WHENEVER clause
Date: 1996/04/22
Message-ID: <4lguhv$6ou_at_tiger.avana.net>#1/1
Salutations to all,
Iā€™m in need of help with using the WHENEVER clause when handling
errors. In the book, Oracle
Developerā€™s Guide, on page 229, it states DO RETURN is an action you can
direct your program to
take in a WHENEVER clause. Well I tried that action and got the
following:
EXEC SQL WHENEVER SQLERROR DO RETURN;
........................................................................
.............1
(1) PCC-S-02201, Encountered the symbol ";" when
expecting one of the following:
- ( [ . ++ -- ->
from Pro*.C. Futhermore, the book states that parameters cannot be
passed to or return from
functions that are referenced in a WHENEVER clause. Yet, half of the
sample*.pc programs in $ORACLE_HOME/proc/demo/ are passing a string to
the function referenced in a WHENEVER
clause. For example, sample2.pc includes the following:
EXEC SQL WHENEVER SQLERROR DO sql_error("ORACLE error--");
Is the book in error? Or am I missing something here?
Oracle7 Server 7.2.2, Pro*C 2.1.2.0., and AIX 3.2 is the environment Iā€™m programming in.
All responses are appreciated.
Thanks,
Al Holloway
alh_at_tiger.avana.net
Received on Mon Apr 22 1996 - 00:00:00 CEST