Return the server user-defined format string associated with a result column.
CS_RETCODE ct_getformat (cmd, colnum, buffer, buflen, outlen)
CS_COMMAND *cmd; CS_INT colnum; CS_VOID *buffer; CS_INT buflen; CS_INT *outlen;
A pointer to the CS_COMMAND structure managing a client/server operation.
The number of the column whose user-defined format is desired. The first column in a select list is column number 1, the second is number 2, and so forth.
A pointer to the space in which ct_getformat will place a null-terminated format string.
The length, in bytes, of the *buffer data space.
A pointer to an integer variable.
If outlen is supplied, ct_getformat sets *outlen to the length, in bytes, of the format string. This length includes the null terminator.
If the format string is larger than buflen bytes, an application can use the value of *outlen to determine how many bytes are needed to hold the string.
If no format string is associated with the column identified by colnum, ct_getformat sets *outlen to 1 (for the null terminator).
ct_getformat returns the following values:
Return value |
Meaning |
---|---|
CS_SUCCEED |
The routine completed successfully. |
CS_FAIL |
The routine failed. |
CS_BUSY |
An asynchronous operation is already pending for this connection. See “Asynchronous programming”. |
An application can call ct_getformat after ct_results indicates results of type CS_ROW_RESULT.
If no format string is associated with the column identified by colnum, ct_getformat sets *outlen to 1.
Typical applications will not use ct_getformat, which is provided primarily for gateway applications support.