SQL Error Return—ANSI Mode
Error conditions arising during processing of a SQL request made in ANSI mode are returned to the application through the SQLCODE or SQLSTATE variables, which are documented in SQL Stored Procedures and Embedded SQL (B035‑1148).