For most command types, Client-Library allows an application to resend the command after the results of previous execution have been processed. Enhancements to ct_send, ct_cursor, and ct_bind, and the addition of ct_setparam routine in version 11.1 allow batch-processing applications to resend commands and reuse binds when repeatedly executing the same server command. This feature can eliminate redundant calls to ct_bind, ct_command, ct_cursor, and ct_param.
The application resends commands as follows:
If necessary, the application changes values in parameter source variables.
If the command requires parameters, the application should define parameter source variables with ct_setparam instead of passing values with ct_param. Input parameter values passed with ct_param can not be changed when a command is resent.
The application calls ct_send to resend the command after the results of the previous command execution have been processed and before a new command is initiated on the command structure.
An application can resend all types of commands except:
Send-data commands initiated by ct_command(CS_SEND_DATA_CMD)
Send-bulk commands initiated by ct_command(CS_SEND_BULK_CMD)
ct_cursor cursor commands other than cursor-update or cursor-delete
ct_dynamic commands other than execute-immediate commands or a command to execute a prepared statement