home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #16 / NN_1992_16.iso / spool / comp / database / oracle / 1170 < prev    next >
Encoding:
Text File  |  1992-07-30  |  1.2 KB  |  36 lines

  1. Newsgroups: comp.databases.oracle
  2. Path: sparky!uunet!uunet.ca!wildcan!al
  3. From: al@cvgis.prime.com (Al Parker)
  4. Subject: Embedded SQL WHENEVER NOT FOUND problem
  5. Message-ID: <1992Jul30.133215.7885@cvgis.prime.com>
  6. Organization: Computervision GIS (Toronto)
  7. X-Newsreader: Tin 1.1 PL4
  8. Date: Thu, 30 Jul 1992 13:32:15 GMT
  9. Lines: 25
  10.  
  11. Greetings,
  12. I am finding that in certain usage of the Pro*C precompiler with
  13. 'mode=ansi13' and the following code:
  14.  
  15. EXEC SQL WHENEVER NOT FOUND GOTO :c_statement1;
  16. EXEC SQL WHENEVER SQLERROR GOTO :c_statement2;
  17. ...
  18. EXEC SQL EXECUTE IMMEDIATE :sql_statement;
  19. ...
  20. the Pro*C precompiler does not generate a check for the NOT FOUND
  21. condition after the EXECUTE IMMEDIATE. (It does correctly generate 
  22. the check for the SQLERROR condition.)
  23.  
  24. The work-around is to perform the check explicitly:
  25.  
  26. if( sqlca.sqlcode == 100 ) goto c_statement1;
  27.  
  28. but it would be nice if the WHENEVER worked as documented.
  29.  
  30. Has anyone else encountered this problem ?
  31. -- 
  32. -------------------------------------------------------------------------------
  33. Al Parker, P.Eng, Sr Software Engineer - Computervision GIS
  34. al@cvgis.prime.com    (416)508-8020(x881)
  35. These opinions are my own and not those of my compnay.
  36.