INFORMIX
Informix-ESQL/C Programmer's Manual
Chapter 11: Exception Handling
Home Contents Index Master Index New Book

Obtaining Diagnostic Information After an SQL Statement

After your ESQL/C program executes an SQL statement, the database server returns information about the success of the statement. This section summarizes the following information:

Types of Diagnostic Information

The database server can return the following types of diagnostic information:

Types of Database Exceptions

When the database server executes an SQL statement, it can return one of four types of database exceptions to the application program:

    The SQL statement executed successfully. When a statement that might return data into host variables executes, a success condition means that the statement has returned the data and that the program can access it through the host variables.

    A warning is a condition that does not prevent successful execution of an SQL statement; however, the effect of the statement is limited and the statement might not produce the expected results. A warning can also provide additional information about the executed statement.

    The SQL statement executed without errors, with the following exceptions:

    The SQL statement did not execute successfully and made no change to the database. Runtime errors can occur at the following levels:

Descriptive Information

The following SQL statements can return information about SQL statements:

The Informix Guide to SQL: Syntax fully describes these two statements.

Types of Status Variables

The following methods obtain diagnostic information about the outcome of an SQL statement:

When you create applications that must conform to either the ANSI or X/Open standard, use the SQLSTATE variable as your primary exception-handling method.




Informix-ESQL/C Programmer's Manual, version 9.1
Copyright © 1998, Informix Software, Inc. All rights reserved.