Determining the success of SQL statements

When Db2® finishes executing an SQL statement, Db2 sends a return code in the SQLCODE and SQLSTATE fields of the SQLCA structure to indicate whether the operation succeeded or failed. In your program, test the return code and take any necessary action.

About this task