CS_SERVERMSG structure

A CS_SERVERMSG structure contains information about a server error message.

Open Server uses a CS_SERVERMSG structure to send error messages to a client, through the srv_sendinfo routine.

A CS_SERVERMSG structure is defined as follows:

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

where:

For more information on sending a message in chunks, see “Client command errors”.