Most applications use callback routines to handle errors messages.
Client-Library provides in-line message handling as an alternative to callback message handling. In-line message handling gives an application control over when it handles messages. The ct_diag routine initializes in-line message handling at the connection level.
Client-Library and CS-Library use structures to return error and message information to message callback routines:
The CS_CLIENTMSG structure describes Client-Library and CS-Library errors. The structure is passed to an application’s Client-Library or CS-Library error handler. Most of the fields in this structure map directly to DB-Library error handler parameters.
The CS_SERVERMSG structure describes server messages and is passed to an application’s server message handler. Most of these fields map directly to DB-Library message-handler parameters.