Open Source RDBMS - Seamless, Scalable, Stable and Free

한국어 | Login |Register

Versions available for this page: CUBRID 8.4.1 |  CUBRID 8.4.3 |  CUBRID 9.0.0 | 



cci_prepare_and_execute

Description

The cci_prepare_and_execute function executes the SQL statement immediately and returns a request handle for the SQL statement. A request handle, SQL statement, the maximum length of a column to be fetched, error code, and the address of a T_CCI_ERROR construct variable in which error information being stored are specified as arguments. max_col_size is a value to configure the maximum length of a column to be sent to a client when the column of a SQL statement is CHAR, VARCHAR, NCHAR, VARNCHAR, BIT, or VARBIT. If this value is 0, full length is fetched.

Syntax

int cci_prepare_and_execute(int conn_handle, char *sql_stmt, int max_col_size, int *exec_retval, T_CCI_ERROR *err_buf)

  • conn_handle : (IN) Request handle
  • sql_stmt : (IN) SQL statement
  • max_col_size : (IN) The maximum length of a column to be fetched when it is a string data type in bytes. If this value is 0, full length is fetched.
  • exec_retval : (OUT) Error code
  • err_buf : (OUT) Database error buffer
Return Value
  • Success : Request handle ID (int)
  • Failure : Error code
Error Codes
  • CCI_ER_CON_HANDLE
  • CCI_ER_DBMS
  • CCI_ER_COMMUNICATION
  • CCI_ER_STR_PARAM
  • CCI_ER_NO_MORE_MEMORY
  • CCI_ER_CONNECT
  • CCI_ER_QUERY_TIMEOUT