A CS_IODESC, also called an “I/O descriptor structure,” describes text or image data.
An Open Server application calls srv_text_info with a cmd argument of CS_GET when processing text or image data from a client. Only the total_textlen field of the CS_IODESC argument is filled in by this call.
If the application is sending columns of data to a client, it calls srv_text_info with a cmd argument of CS_SET. In this scenario, the CS_IODESC structure describes a text or image column being sent. A CS_IODESC is defined as follows:
typedef struct _cs_iodesc
{
CS_INT iotype; /* CS_IODATA */
CS_INT datatype; /* Text or image. */
CS_LOCALE *locale; /* Locale information. */
CS_INT usertype; /* User-defined type. */
CS_INT total_txtlen; /* Total data length. */
CS_INT offset; /* Reserved. */
CS_BOOL log_on_update; /* Log the insert. */
CS_CHAR name[CS_OBJ_NAME]; /* Name of data object.*/
CS_INT namelen; /* Length of name. */
CS_BYTE timestamp[CS_TS_SIZE]; /* Adaptive Server Enterprise id. */
CS_INT timestamplen; /* Length of timestamp.*/
CS_BYTE textptr[CS_TP_SIZE]; /* Adaptive Server Enterprise pt */
CS_INT textptrlen; /* Length of textptr. */
} CS_IODESC;
where:
iotype indicates the type of I/O to perform. For text and image operations, iotype always has the value CS_IODATA.
datatype is the datatype of the data object. The only legal values for datatype are CS_TEXT_TYPE and CS_IMAGE_TYPE.
locale is not currently used in Open Server. Set to NULL.
usertype is not used in Open Server.
total_txtlen is the total length, in bytes, of the text or image value.
offset is reserved for future use.
log_on_update describes whether to log the update to this text or image value.
name is the name of the text or image column.
namelen is the length, in bytes, of name, or CS_NULLTERM to indicate a null-terminated name.
timestamp is the text timestamp of the column. A text timestamp marks the time of a text or image column’s last modification.
timestamplen is the length, in bytes, of timestamp.
textptr is an array of text or image bytes for column insertion or retrieval.
textptrlen is the length, in bytes, of textptr.