Deallocate a CS_COMMAND structure.
CS_RETCODE ct_cmd_drop(cmd) CS_COMMAND *cmd;
A pointer to a CS_COMMAND structure.
ct_cmd_drop 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”. | 
ct_cmd_drop returns CS_FAIL if:
*cmd has an active command. A command that has been initialized but not yet sent is considered to be active.
*cmd has an open cursor.
*cmd has pending results.
          if ((retcode = ct_cmd_drop(cmd)) != CS_SUCCEED)
           {
                ex_error("DoCompute: ct_cmd_drop() failed");
                return retcode;
           }
This code excerpt is from the compute.c sample program.
A CS_COMMAND structure is a control structure that a Client-Library application uses to send commands to a server and process the results of those commands.
Once a command structure has been deallocated, it cannot be reused. To allocate a new CS_COMMAND structure, an application can call ct_cmd_alloc.
Before deallocating a command structure, an application should cancel any active commands, process or cancel any pending results, and close and deallocate any open cursors on the command structure.