Contains an engine-specific status code indicating a warning
Some database engines support a
SQLSTATEstatus code which is updated after each SQL statement.
SQLSTATEis a five-character string which can be set for warning or error conditions. In Panther, warning conditions from
SQLSTATEare written to
@dmwarnsqlstate; error conditions are written to
By default, Panther ignores warnings. If an application needs to alert users to warning codes, it must use a JPL or C function to check for them. There is no default warning handler. The most efficient way to process warning codes is with an installed exit handler using DBMS ONEXIT.
If the database engine does not support
SQLSTATE, the value of
@dmwarnsqlstate will be
"00000", the value which represents success.
If the application accesses multiple database engines, the database driver for each engine must support
SQLSTATEin order to use its values for application process ing.
@dmwarnsqlstateis set to
DBMSstatement. If you need its value for further processing, it should be copied to another variable.