PSQL
Deprecated in
Type
INTEGER
In a “WHEN … DO
” error handling block, the SQLCODE
context variable contains the current SQL error code. Prior to Firebird 2.0, was only set in WHEN SQLCODE
and WHEN ANY
handlers. Now it may also be non-zero in WHEN GDSCODE
and WHEN EXCEPTION
blocks, provided that the condition raising the error corresponds with an SQL error code. Outside error handlers, is always 0. Outside PSQL, it doesn’t exist at all.
Example