Firebird Documentation IndexFirebird 1.5 Language Ref. UpdateContext variables → GDSCODE
Firebird Home Firebird Home Prev: DELETINGFirebird Documentation IndexUp: Context variablesNext: INSERTING

GDSCODE

Available in: PSQL

Added in: 1.5

Description: In a WHEN GDSCODE handling block, the GDSCODE context variable contains a numerical representation of the current Firebird error code. It is 0 in WHEN SQLCODE, WHEN EXCEPTION and WHEN ANY handlers, as well as everywhere else in PSQL.

Type: INTEGER

Example: 

when gdscode 335544551, gdscode 335544552,
     gdscode 335544553, gdscode 335544707
do
begin
  execute procedure log_grant_error(gdscode);
  exit;
end
Prev: DELETINGFirebird Documentation IndexUp: Context variablesNext: INSERTING
Firebird Documentation IndexFirebird 1.5 Language Ref. UpdateContext variables → GDSCODE