Message and error handling

DB-Library/C applications must handle two types of messages and errors:

Also, success or failure indications are returned by most DB-Library/C routines.

To handle server messages, DB-Library/C errors, and success or failure indications, a DB-Library/C application can:

Sybase strongly recommends that all DB-Library/C applications use centralized message and error handling in addition to mainline error testing. Centralized message and error handling has substantial benefits for large or complex applications. For example:

To provide a DB-Library/C application with centralized message and error handling, the application programmer must write a message handler and an error handler and install them using dbmsghandle and dberrhandle.

The DB-Library/C routines for message and error handling are: