mohInt

  1. Where do you find sql return codes?
    • SQL Return Code is held in the field SQLCODE within the DB2 SQLCA block.
    • The SQL-standard replaced SQLCODE by the more detailed SQLSTATE.
  2. SQLCA
    The SQL communications area (SQLCA) structure is used within the DB2 program to return a feedback to the application program. The information in the SQLCA and the SQLCODE field are updated after every API call with a SQL statement. SQLCA contains ERROR HANDLING data.
  3. SQLCODE
    The SQLCODE field contains the SQL return code. The code can be zero (0), negative or positive:

    0 means that the execution was successful.

    Negative values incidate an unsuccessful execution with an error.

    Positive value mean a successful execution with a warning.
  4. SQLCODES -904, -911, -913, -922, -924
    • -904 Unavailable resource. Someone else is locking your data.
    • -911 Deadlock or timeout. Rollback has been done.
    • -913 Deadlock or timeout. No rollback.
    • -922 Authorization needed.
    • -924 DB2 Connection internal error.
  5. SQLCODES 0, +100, -811, -30090
    • 0 = SUCCESSFUL
    • +100 Row not found or end of cursor.
    • -811 = More than one row retrieved in SELECT INTO.
    • -30090 Remote operation invalid for application execution environment.
  6. +100 Row not found or end of cursor.
Author
slc53
ID
338974
Card Set
mohInt
Description
mohInt
Updated