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

Exception Handling

Obtaining Diagnostic Information After an SQL Statement
Types of Diagnostic Information
Types of Database Exceptions
Descriptive Information
Types of Status Variables
Exception Handling with SQLSTATE
Using GET DIAGNOSTICS
Statement Information
Exception Information
Using the SQLSTATE Variable
Class and Subclass Codes
List of SQLSTATE Class Codes
Checking for Exceptions with SQLSTATE
Success in SQLSTATE
NOT FOUND in SQLSTATE
Warnings in SQLSTATE
Runtime Errors in SQLSTATE
Multiple Exceptions
Exception Handling with the sqlca Structure
Fields of the sqlca Structure
Using the SQLCODE Variable
SQLCODE in Pure C Modules
SQLCODE and the exit() Call
SQLCODE After a DESCRIBE Statement
Checking for Exceptions with sqlca
Success in sqlca
NOT FOUND in SQLCODE
Warnings in sqlca.sqlwarn
Runtime Errors in SQLCODE
Displaying Error Text
Choosing an Exception-Handling Strategy
Checking After Each SQL Statement
The WHENEVER Statement
Library Functions for Retrieving Error Messages
rgetlmsg()
rgetmsg()
Displaying Error Text in a Windows Environment
A Program That Uses Exception Handling
Compiling the Program
Guide to the getdiag.ec File
Guide to the exp_chk.ec File



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