Programming Guide



@dmwarnsqlstate

Contains an engine-specific status code indicating a warning

Description

Some database engines support a SQLSTATE status code which is updated after each SQL statement. SQLSTATE is a five-character string which can be set for warning or error conditions. In Panther, warning conditions from SQLSTATE are written to @dmwarnsqlstate; error conditions are written to @dmerrsqlstate.

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 ONEXIT.

If the database engine does not support SQLSTATE, the value of @dmwarnsqlstate will be "00000", the value that represents success.

If the application accesses multiple database engines, the database driver for each engine must support SQLSTATE in order to use its values for application process ing.@dmwarnsqlstate is set to "00000" before each DBMS statement. If you need its value for further processing, it should be copied to another variable.