SQL return codes: Difference between revisions
wikademia>RHaworth AfD |
originally created as w:en:SQL Return Codes by w:en:Wallie |
||
| Line 1: | Line 1: | ||
'''SQL Return Codes''' are used on a day to day basis for the diagnosis of programming failures as a result of SQL calls by [[w:en:IBM DB2|DB2]] [[w:en:computer program|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 [[w:en:SQLCA|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 [[IBM DB2|DB2]] [[computer programs]]. An important feature of | |||
== SQLCA == | == SQLCA == | ||
The SQL communications area (SQLCA) structure is used within the | The SQL communications area (SQLCA) structure is used within the DB2 program to return error information to the [[w:en:application program|application program]]. This information in the SQLCA and the SQLCODE field is updated after every [[w:en:Application programming interface| | ||
API]] call for the SQL statement. | API]] call for the SQL statement. | ||
| Line 75: | Line 71: | ||
+304 Value cannot be assigned to this host variable because it is out of range. | +304 Value cannot be assigned to this host variable because it is out of range. | ||
+802 The null indicator was set to -2 as an arithmetic statement didn't work. | +802 The null indicator was set to -2 as an arithmetic statement didn't work. | ||
[[category:SQL]] | |||