Sets, retrieves, or clears information about the current result set.
CS_RETCODE ct_cmd_props(command, action, property, buffer, buf_len, outlen); CS_COMMAND *command; CS_INT action; CS_INT property; CS_VOID *buffer; CS_INT buf_len; CS_INT *outlen
(I) Handle for this client/server operation. This handle is defined in the associated ct_cmd_alloc call. The command handle corresponds to the TDPROC handle in the Open ServerConnect Gateway-Library.
(I) Action to be taken by this call. action is an integer variable that indicates the purpose of this call. Assign action one of the following symbolic values:
Value |
Meaning |
---|---|
CS_GET (33) |
Retrieves the value of the property. |
CS_SET (34) |
Sets the value of the property. |
CS_CLEAR (35) |
Clears the value of the property by resetting the property to its Client-Library default value. |
(I) Symbolic name of the property whose value is being set or retrieved. Client-Library properties are listed under “Remote procedure calls (RPCs)”, with descriptions, possible values, and defaults.
(I/O) Variable (buffer) that contains the specified property value.
If action is CS_SET, the buffer contains the value used by ct_cmd_props.
If action is CS_GET, ct_cmd_props returns the requested information to this buffer.
If action is CS_CLEAR, the buffer is reset to the default property value.
This argument is typically one of the following datatypes:
int buffer[n]; char buffer[n];
(I) Length, in bytes, of the buffer.
If action is CS_SET and the value in the buffer is a fixed-length or symbolic value, buf_len should have a value of CS_UNUSED.
If action is CS_GET and buffer is too small to hold the requested information, ct_cmd_props sets outlen to the length of the requested information and returns CS_FAIL. To retrieve all the requested information, change the value of buf_len to the length returned in outlen and rerun the application.
If action is CS_CLEAR, set this value to CS_UNUSED.
(O) Length, in bytes, of the retrieved information. outlen is an integer variable where ct_cmd_props returns the length of the property value being retrieved.
When the retrieved information is larger than buf_len bytes, an application uses the value of outlen to determine how many bytes are needed to hold the information.
outlen is used only when action is CS_GET. When action is CS_CLEAR or CS_SET, this value is zero.
ct_cmd_props returns one of the following values:
Value |
Meaning |
---|---|
CS_SUCCEED (-1) |
The routine completed successfully. |
CS_FAIL (-2) |
The routine failed. |
TDS_INVALID_PARAMETER (-4) |
One or more arguments were given illegal values. |
TDS_CANNOT_SET_VALUE (-43) |
This property cannot be set by the application. |
ct_cmd_props sets or retrieves the values of properties of command handle structures.
command handle properties affect the behavior of an application at the command structure level.
Some command handle properties default to the value of the property in the parent context. To find out which ones, see “Remote procedure calls (RPCs)”.
Related functions
Related topics