CS_SERVERMSG structure

A CS_SERVERMSG structure contains information about a server error or informational message.

Client-Library uses a CS_SERVERMSG structure in two ways:

For information on error and message handling, see “Error handling”.

A CS_SERVERMSG structure is defined as follows:

/*
 ** CS_SERVERMSG
 ** The Client-Library server message structure.
 */
typedef struct _cs_servermsg
 {
     CS_MSGNUM   msgnumber;
     CS_INT      state;
     CS_INT      severity;
     CS_CHAR     text[CS_MAX_MSG];
     CS_INT      textlen;
     CS_CHAR     svrname[CS_MAX_CHAR];
     CS_INT      svrnlen;
    /*
     ** If the error involved a stored procedure,
     ** the following fields contain information
     ** about the procedure:
     */
     CS_CHAR     proc[CS_MAX_CHAR];
     CS_INT      proclen;
     CS_INT      line;
    /*
     ** Other information.
     */
     CS_INT      status;
     CS_BYTE     sqlstate[CS_SQLSTATE_SIZE];
     CS_INT      sqlstatelen;
} CS_SERVERMSG;

where: