The SQLCA.SQLCODE
The SQLCA name stands for "SQL Communication Area". The
SQLCA variable is a predefined record
containing information on the execution of an SQL statement.
The SQLCA record is filled after any SQL statement execution. The
SQLCODE member of this record
contains the SQL execution code:
| Execution Code | Description |
|---|---|
| 0 | SQL statement executed successfully. |
| 100 | No rows were found. |
| <0 | An SQL error occurred. |
The NOTFOUND constant is a predefined integer value that evaluates to "100".
This constant is typically used to test the execution status of
an SQL statement returning a result set, to check if rows have
been found.