Exception.GetSQLCode |
Top Previous Next |
Syntax function Exception.GetSQLCode(): integer
Alternative Names
Description Returns the SQL code for the current exception. Can be used in exception handling blocks only.
See Also
Example execute udsblock() returns(textout varchar(200), codeout bigint, nativecodeout bigint) as begin delete from EX_HANDLING;
insert into ex_handling (pk) values (1); begin insert into ex_handling (pk) values (2); insert into ex_handling (pk) values (3); insert into ex_handling (pk) values (1); /* this will raise an error */ insert into ex_handling (pk) values (4); /* this will not be executed */ when sqlcode -803, exception eat_exception do begin textout = Exception.GetMessage(); codeout = Exception.GetSQLCode(); nativecodeout = Exception.GetCode(); end end end |