Sybase Technical Library - Product Manuals Home
[Search Forms] [Previous Section with Hits] [Next Section with Hits] [Clear Search] Expand Search

CS_OID structure [Table of Contents] SQLCA structure

Open Client Client-Library/C Reference Manual

[-] Chapter 2 Topics
[-] Client-Library and SQL Structures
[-] CS_SERVERMSG structure

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_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:


CS_OID structure [Table of Contents] SQLCA structure