Help With WHENEVER Clause
Date: 1996/04/20
Message-ID: <4lbrfr$p27_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 Sat Apr 20 1996 - 00:00:00 CEST
