Open Client and Open Server use type constants to describe the datatypes of program variables. For example, when calling ct_bind to describe a bind variable of type CS_DATETIME, an application sets the datatype field of the CS_DATAFMT structure to CS_DATETIME_TYPE.
Client-Library routines that use type constants include ct_bind, ct_describe, and ct_param. In addition, the CS-Library routine cs_convert uses type constants.
The type constant for a datatype is the name of the datatype with “_TYPE” appended. For example, the type constant for the datatype CS_CHAR is CS_CHAR_TYPE.
With the exception of CS_CHAR, all datatypes correspond to a single type constant.
CS_CHAR corresponds to three: CS_CHAR_TYPE, CS_BOUNDARY_TYPE, and CS_SENSITIVITY_TYPE. This means that variables described as CS_BOUNDARY_TYPE or CS_SENSITIVITY_TYPE must be declared as CS_CHAR.
Table 3-3 lists Open Client type constants.