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_oid_put2

Description

The cci_oid_put2 function sets the attr_name attribute values of the given oid to new_val. The last value of attr_name must be NULL. To insert a NULL value, set the value of new_val[i] to NULL.

The type of new_val[i] for a_type is shown in the table below.

Type of new_val[i] for a_type

Type

value type

CCI_A_TYPE_STR

char*

CCI_A_TYPE_INT

int*

CCI_A_TYPE_FLOAT

float*

CCI_A_TYPE_DOUBLE

double*

CCI_A_TYPE_BIT

T_CCI_BIT*

CCI_A_TYPE_SET

T_CCI_SET

CCI_A_TYPE_DATE

T_CCI_DATE*

CCI_A_TYPE_BIGINT

int64_t (For Windows : __int64)

Syntax

intcci_oid_put2(int conn_handle, char *oidstr, char **attr_name, void **new_val, int *a_type, T_CCI_ERROR *err_buf)

  • conn_handle : (IN) Connection handle
  • oid_str : (IN) oid
  • attr_name : (IN) A list of attribute names
  • new_val : (IN) A new value array
  • a_type : (IN) new_val type array
  • err_buf : (OUT) Database error buffer
Return Value
  • Error code (0 : success)
Error Codes
  • CCI_ER_CON_HANDLE
  • CCI_ER_CONNECT
Example

char *attr_name[array_size]

void *attr_val[array_size]

int a_type[array_size]

int int_val

 

attr_name[0] = "attr_name0"

attr_val[0] = &int_val

a_type[0] = CCI_A_TYPE_INT

attr_name[1] = "attr_name1"

attr_val[1] = "attr_val1"

a_type[1] = CCI_A_TYPE_STR

 

attr_name[num_attr] = NULL

 

res = cci_put2(con_h, oid_str, attr_name, attr_val, a_type, &error)