You initiate a cursor-open command by calling ct_cursor(CS_CURSOR_OPEN). If the cursor requires input parameters, define them by calling ct_param or ct_setparam once for each parameter value. Parameter values are required if any of the following conditions are true:
The body of the cursor is a SQL text string that contains host variables.
The body of the cursor is a stored procedure that requires input parameter values.
The body of the cursor is a dynamic SQL statement that contains dynamic parameter markers.
Applications that restore cursor-open commands should call ct_setparam rather than ct_param to specify parameter values for the cursor-open command. When ct_setparam is used, the application can change the parameter values for the restored cursor-open command. (See “Reopening a cursor”.)