CS_DATAFMT structure

A CS_DATAFMT structure is used to describe data values and program variables. For example:

Most routines use only a subset of the fields in a CS_DATAFMT. For example, ct_bind does not use the name, status, and usertype fields, and ct_describe does not use the format field. For information on which fields in the CS_DATAFMT a routine uses, see the reference page for the routine.

        typedef struct _cs_datafmt
         {
             CS_CHAR name[CS_MAX_NAME];  /* Name of data */
             CS_INT  namelen;            /* Length of name */
             CS_INT  datatype;           /* Datatype */
             CS_INT  format;             /* Format symbols */
             CS_INT  maxlength;          /* Data max length */
             CS_INT  scale;              /* Scale of data */
             CS_INT  precision;          /* Data precision */
             CS_INT  status;             /* Status symbols */
           /*
             ** The following field indicates the number of 
             ** rows to copy, per ct_fetch call, to a bound 
             ** program variable. ct_describe sets this field 
             ** to a default value of 1. ct_bind is the only
             ** routine that reads this field.
             */
             CS_INT  count;
           /*
             ** These fields are used to support Adaptive Server 
             ** user-defined datatypes and international
             ** datatypes:
             */
            CS_INT      usertype;   /* Svr user-def’d type */
            CS_LOCALE   *locale;    /* Locale information */
       } CS_DATAFMT;

where: