Handling SQL Errors (WHEN … DO)
From InterBase
Procedures can also handle error numbers returned in SQLCODE
. After each SQL statement executes, SQLCODE
contains a status code indicating the success or failure of the statement. It can also contain a warning status, such as when there are no more rows to retrieve in a FOR SELECT
loop.