SQLCODE after a DESCRIBE statement

The DESCRIBE statement returns information about a prepared statement before the statement executes. It operates on a statement ID that a PREPARE statement has previously assigned to a dynamic SQL statement.

After a successful DESCRIBE statement, the database server sets SQLCODE (and sqlca.sqlcode) to a nonnegative integer value that represents the type of SQL statement that DESCRIBE has examined. The sqlstype.h header file declares constant names for each of these return values. For a list of possible SQLCODE values after a DESCRIBE statement, see Determine the statement type.

Because the DESCRIBE statement uses the SQLCODE field differently than any other statement, you might want to revise your exception-handling routines to accommodate this difference.