home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.databases.oracle
- Path: sparky!uunet!uunet.ca!wildcan!al
- From: al@cvgis.prime.com (Al Parker)
- Subject: Embedded SQL WHENEVER NOT FOUND problem
- Message-ID: <1992Jul30.133215.7885@cvgis.prime.com>
- Organization: Computervision GIS (Toronto)
- X-Newsreader: Tin 1.1 PL4
- Date: Thu, 30 Jul 1992 13:32:15 GMT
- Lines: 25
-
- Greetings,
- I am finding that in certain usage of the Pro*C precompiler with
- 'mode=ansi13' and the following code:
-
- EXEC SQL WHENEVER NOT FOUND GOTO :c_statement1;
- EXEC SQL WHENEVER SQLERROR GOTO :c_statement2;
- ...
- EXEC SQL EXECUTE IMMEDIATE :sql_statement;
- ...
- the Pro*C precompiler does not generate a check for the NOT FOUND
- condition after the EXECUTE IMMEDIATE. (It does correctly generate
- the check for the SQLERROR condition.)
-
- The work-around is to perform the check explicitly:
-
- if( sqlca.sqlcode == 100 ) goto c_statement1;
-
- but it would be nice if the WHENEVER worked as documented.
-
- Has anyone else encountered this problem ?
- --
- -------------------------------------------------------------------------------
- Al Parker, P.Eng, Sr Software Engineer - Computervision GIS
- al@cvgis.prime.com (416)508-8020(x881)
- These opinions are my own and not those of my compnay.
-