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. Your program should test the return code and take any necessary action.
related tasks
DB2 UDB Application Development Guide: Programming Client Applications