cci_execute

Description

The cci_execute function executes the SQL statement (prepared statement) that has executed cci_prepare(). A request handle, flag, the maximum length of a column to be fetched, and the address of a T_CCI_ERROR construct variable in which error information being stored are specified as arguments.

The function of retrieving the query result from the server through a flag can be classified as synchronous or asynchronous. If the flag is set to CCI_EXEC_QUERY_ALL, a synchronous mode (sync_mode) is used to retrieve query results immediately after executing prepared queries if it is set to CCI_EXEC_ASYNC, an asynchronous mode (async_mode) is used to retrieve the result immediately each time a query result is created. The flag is set to CCI_EXEC_QUERY_ALL by default, and in such cases the following rules are applied.

max_col_siz  is a value that is used to determine the maximum length of a column to be sent to a client when the type of the column of the prepared query is CHAR, VARCHAR, NCHAR, VARNCHAR, BIT or VARBIT. If this value is 0, full length is fetched.

Syntax

int cci_execute(int req_handle, char flag, int max_col_size, T_CCI_ERROR *err_buf)

Return Value
Error Codes