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_connect

Description

A connection handle to the database server is assigned and it tries to connect to the server. If it has succeeded, the connection handle ID is returned; if fails, an error code is returned.

Syntax

int cci_connect(char *ip, int port, char *db_name, char *db_user, char *db_password)

  • ip : (IN) A character string representing the IP address of the server (host name)
  • port : (IN) Broker port ( the port configured in the $CUBRID/conf/cubrid_broker.conf file)
  • db_name : (IN) Database name
  • db_user : (IN) Database user name
  • db_passwd : (IN) Database user password
Return Value
  • Success : Connection handle ID (int)
  • Failure : Error code
Error Code
  • CCI_ER_NO_MORE_MEMORY
  • CCI_ER_HOSTNAME
  • CCI_ER_CON_HANDLE
  • CCI_ER_DBMS
  • CCI_ER_COMMUNICATION
  • CCI_ER_CONNECT