Success in sqlca

When the database server executes an SQL statement successfully, it sets SQLCODE (sqlca.sqlcode) to 0. The database server might also set one or more of the following informational fields in sqlca after a successful SQL statement:
  • After a PREPARE for a SELECT, DELETE, INSERT, or UPDATE:
    • sqlca.sqlerrd[0] indicates an estimated number of rows affected.
    • sqlca.sqlerrd[3] contains the estimated weighted sum of disk accesses and total rows processed.
  • After an INSERT, sqlca.sqlerrd[1] contains the value that the database server has generated for a SERIAL column.
  • After a SELECT, INSERT, DELETE, or UPDATE:
    • sqlca.sqlerrd[2] contains the number of rows that the database server processed.
    • sqlca.sqlerrd[5] contains the rowid (physical address) of the last row that was processed. Whether this rowid value corresponds to a row that the database server returns to the user depends on how the database server processes a query, particularly for SELECT statements.
  • After a CONNECT, SET CONNECTION, DATABASE, CREATE DATABASE, or START DATABASE, the sqlca.sqlwarn.sqlwarn0 field is set to W and other fields of sqlca.sqlwarn provide information about the database and connection.