Your Browser is not longer supported

Please use Google Chrome, Mozilla Firefox or Microsoft Edge to view the page correctly
Loading...

{{viewport.spaceProperty.prod}}

Monitoring success

Use the host variable SQLSTATE, which SESAM/SQL supports in the ESQL interface, to check whether a statement was successful.

You must define SQLSTATE in your program in a DECLARE SECTION with the SQL data type CHAR(5). This definition must be located before the first SQL statement in the program text and must be valid, with regard to programming language conventions, for all the statements that use it.

After an SQL statement has been executed, SQLSTATE is assigned an SQL status code. The possible values for SQLSTATE are described in the “ Messages” manual.

For reasons of compatibility with SESAM/SQL V1.x, the host variable SQLCODE for monitoring the success of SQL statements is supported. You should not, however, use this host variable in new applications.