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
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 Codes
- CCI_ER_NO_MORE_MEMORY
- CCI_ER_HOSTNAME
- CCI_ER_CON_HANDLE
- CCI_ER_DBMS
- CCI_ER_COMMUNICATION
- CCI_ER_CONNECT