Open Source RDBMS - Seamless, Scalable, Stable and Free

한국어 | Login |Register

Versions available for this page: CUBRID 8.2.1 |  CUBRID 8.3.0 |  CUBRID 8.3.1 |  CUBRID 8.4.0 |  CUBRID 8.4.1 |  CUBRID 8.4.3 |  CUBRID 9.0.0 | 

cci_execute_result

Description

The cci_execute_result function stores  the execution results (e.g. statement type, result count) performed by cci_execute() to the array of T_CCI_QUERY_RESULT structures. You can use CCI_QUERY_RESULT_STMT_TYPE, CCI_QUERY_RESULT_ERR_NO, CCI_QUERY_RESULT_ERR_MSG and  CCI_QUERY_RESULT_RESULT macros to get the results of each query. Regarding the summary of these macros, see cci_execute_array().

The query results used must be deleted by cci_query_result_free.

Syntax

int cci_execute_result(int req_handle, T_CCI_QUERY_RESULT **query_result, T_CCI_ERROR *err_buf)

  • req_handle: (IN) Request handle of the prepared statement
  • query_result: (OUT) Query results
  • err_buf: (OUT) Database error buffer
Return Value
  • Suceess: The number of queries
  • Failure: Negative number
Error Code
  • CCI_ER_REQ_HANDLE
  • CCI_ER_COMMUNICATION
Example

T_CCI_QUERY_RESULT *qr;

 

cci_execute( … );

res = cci_execute_result(req_h, &qr, &err_buf);

if (res < 0) {

  /* error */

}

else {

  for (i=1 ; i <= res ; i++) {

    result_count = CCI_QUERY_RESULT_RESULT(qr, i);

    stmt_type = CCI_QUERY_RESULT_STMT_TYPE(qr, i);

  }

  cci_query_result_free(qr, res);

}