SQL return codes: Difference between revisions
wikademia>Wallie No edit summary |
wikademia>Wallie No edit summary |
||
| Line 3: | Line 3: | ||
'''SQL Return Codes''' are used on a day to day basis for the diagnosis of programming failures as a result of SQL calls by DB2 computer programs. An important feature of DB2 programs is the error processing. The error diagnostic containing the SQL Return Code is held in the field '''SQLCODE''' within the DB2 [[SQLCA]] block. | '''SQL Return Codes''' are used on a day to day basis for the diagnosis of programming failures as a result of SQL calls by DB2 computer programs. An important feature of DB2 programs is the error processing. The error diagnostic containing the SQL Return Code is held in the field '''SQLCODE''' within the DB2 [[SQLCA]] block. | ||
== SQLCA == | |||
The SQL communications area (SQLCA) structure is used within the DB2 program to return error information to the application program. This information in the SQLCA and the SQLCODE field is updated after every [[Application programming interface| | The SQL communications area (SQLCA) structure is used within the DB2 program to return error information to the application program. This information in the SQLCA and the SQLCODE field is updated after every [[Application programming interface| | ||
API]] call for the SQL statement. The SQLCODE field contains the SQL return code. The code can be zero (0), negative or positive. | API]] call for the SQL statement. | ||
== SQLCODE == | |||
The SQLCODE field contains the SQL return code. The code can be zero (0), negative or positive. | |||
0 means successful execution. | 0 means successful execution. | ||