ct_results returns with result_type of CS_DESCRIBE_RESULT to indicate that the result column formats are available. Applications can retrieve the column formats in one of two ways:
With ct_res_info and ct_describe
The application calls ct_res_info to get the number of columns, then, for each parameter, calls ct_describe to initialize a CS_DATAFMT structure with a description of the column.
Typically, an application using this method maintains an array or list of CS_DATAFMT structures for use with later calls to ct_bind.
With ct_dyndesc or ct_dynsqlda
Both these routines allow the application to retrieve formats into a structure that can later be used to retrieve row data when the prepared statement executes.
ct_dynsqlda retrieves formats into a SQLDA structure. The application must allocate the memory for this structure before retrieving formats into it.
ct_dyndesc retrieves formats into an internal Client-Library data structure that is hidden from the application.
ct_dyndesc and ct_dynsqlda both call ct_res_info and ct_describe internally. When used to retrieve row data, ct_dyndesc and ct_dynsqlda both call ct_bind internally.