Call Level Interface Guide and Reference
If the compound statement is ATOMIC and the END COMPOUND
SQLExecDirect() call returns:
- SQL_SUCCESS - all the sub-statements executed without any warnings or
errors.
- SQL_SUCCESS_WITH_INFO - all the sub-statements executed successfully with
one or more warnings. Call SQLError() to obtain generic diagnostic
information, or call SQLGetSQLCA() to obtain the SQLCA for the
entire compound SQL statement. The statement handle used for
SQLError() or SQLGetSQLCA() must the same one used to
process the BEGIN, END COMPOUND SQL.
Most of the information in the SQLCA reflects values set by the database
server when it processed the last sub-statement, such as the SQLCODE and
SQLSTATE. If one or more error occurred and none of these are of a serious
nature, the SQLERRMC field in the SQLCA will contain information on up to a
maximum of seven of these errors.
- SQL_NO_DATA_FOUND - a BEGIN, END COMPOUND was executed without any
sub-statements, or none of the sub-statement affected any rows.
- SQL_ERROR - one or more sub-statements failed, and all sub-statements were
rolled back.
If the compound statement is NOT ATOMIC and the END COMPOUND
SQLExecDirect() call returns:
- SQL_SUCCESS - all sub-statements executed without any errors.
- SQL_SUCCESS_WITH_INFO - the COMPOUND statement executed with one or more
warnings. One or more sub-statements have returned an warning. Call
SQLError() or SQLGetSQLCA() to receive additional
information on the information on the warnings.
- SQL_NO_DATA_FOUND - a BEGIN, END COMPOUND was executed without any
sub-statements, or none of the sub-statement affected any rows.
- SQL_ERROR - the COMPOUND statement failed. At least one sub-statement
returned an error, examine the SQLCA to determine which statement(s) failed.
Note: | Refer to the SQL Reference for details on the contents of an SQLCA after Compound SQL execution.
|
[ Top of Page | Previous Page | Next Page | Table of Contents | Index ]
[ DB2 List of Books |
Search the DB2 Books ]