A Client-Library application uses the function ct_diag to handle messages in line. ct_diag returns message information to two structures defined within the application:
The CS_CLIENTMSG structure for client messages
The CS_SERVERMSG structure for server messages
An application calls ct_diag to initialize in-line message handling for a connection. ct_diag cannot be used at the context level.
Whenever a Client-Library function returns CS_FAIL,
you must run ct_diag to determine what
the error is.
An application can retrieve messages into SQLCA and SQLCODE structures. If the application uses these structures, it must set the property CS_EXTRA_INF to CS_TRUE, using ct_con_alloc.
This is because the SQL structures require information
that Client-Library does not customarily return. If CS_EXTRA_INF is
not set, a loss of information occurs. For more information, see “The CS_EXTRA_INF property”.
For additional information on the in-line method of handling function and server messages, see “CS_SERVERMSG structure”.