SQLCODE
The SQLCODE is also set by the database manager after each SQL statement
is executed as follows:
- If SQLCODE = 0 and SQLWARN0 is blank, execution was successful.
- If SQLCODE = 100, no data was found. For example, a FETCH statement returned
no data, because the cursor was positioned after the last row of the result
table.
- If SQLCODE > 0 and not = 100, execution was successful with a warning.
- If SQLCODE = 0 and SQLWARN0 = 'W', execution was successful with a warning.
- If SQLCODE < 0, execution was not successful.
A complete listing of DB2 UDB for iSeries SQLCODEs and their corresponding SQLSTATEs
is provided in the SQL Messages and Codes book in
the iSeries Information Center.
(C) Copyright IBM Corporation 1992, 2006. All Rights Reserved.