|
|
WHENEVER
Defines action to be taken for errors and exception conditions.
Usage
Description
The action taken in the event of a condition arising during execution of an SQL statement is governed by the most recently issued
WHENEVERstatement. There are three different types of conditions:NOT FOUND,SQLERRORandSQLWARNING. See Return Status and Conditions for a description of the different condition types.The action taken is as follows:
CONTINUEProgram execution continues at the next sequential statement of the source program.
GOTOProgram execution continues at the source code statement identified by
host-label, wherehost-labelis a program label in a program written according to the host language.Notes
If a condition in an SQL statement is not covered by an explicit
WHENEVERstatement issued earlier in the host program code,CONTINUEwill be assumed.Example
... GOTO 1025 EXEC SQL WHENEVER SQLERROR GOTO 1600 1025 CONTINUE EXEC SQL DELETE FROM MYTABLE ...Standard Compliance
|
Mimer Information Technology AB Voice: +46 18 780 92 00 Fax: +46 18 780 92 40 info@mimer.se |
|
|