Hitachi

Hitachi Advanced Database Application Development Guide


19.2.1 a_rdb_SQLAllocConnect() (allocate a connection handle)

Organization of this subsection

(1) Function

This CLI function allocates a connection handle to uniquely identify a connection with the HADB server.

(2) Format

signed short a_rdb_SQLAllocConnect
(
  void                         **ConnectionHandle,   /* Out */
  char                          *ClientDefPath,      /* In  */
  void                          *Option              /* In  */
)

(3) Arguments

ConnectionHandle

Specifies the address at which the connection handle is to be set.

ClientDefPath

Specifies the path of the client definition file, as a character string in C or C++.

When NULL is specified, the function assumes that %ADBCLTDIR%\conf\client.def is specified.#

#: The function assumes $ADBCLTDIR/conf/client.def for HADB clients using Linux.

Option

Specifies NULL.

(4) Return value

  1. If a_rdb_SQLAllocConnect() terminates normally, a_rdb_RC_SQL_SUCCESS is returned.

  2. If a connection handle is allocated successfully, but the disk containing the client message log files has become full, a_rdb_RC_SQL_WARNING is returned.

  3. If an error occurs while messages cannot be output to the client message log file, the error cause code is returned. For details about the error cause code, see 19.8 Return values of the CLI functions.

(5) Notes

a_rdb_SQLAllocConnect() cannot be executed in the following cases: