Handling messages inline

A Client-Library application calls ct_diag to handle Client-Library and server messages inline.

An application can use inline error handling at the connection level only. That is, inline error handling cannot be enabled for a context. If an application has more than one connection, it must make separate ct_diag calls for each connection.

An application calls ct_diag to:

Client-Library does not start saving messages for a connection until inline error handling has been initialized for the connection.

An application can retrieve client-message information into a CS_CLIENTMSG structure or a SQLCA, SQLCODE, or SQLSTATE structure. An application can retrieve server-message information with a CS_SERVERMSG structure or a SQLCA, SQLCODE, or SQLSTATE structure. For information about these structures, see the Open Client Client-Library/C Reference Manual.

If a Client-Library error occurs that makes a CS_CONNECTION structure unusable, ct_diag returns CS_FAIL when called to retrieve information about the original error.