Hitachi

Hitachi Advanced Database Application Development Guide


19.4.1 a_rdb_SQLAllocStmt() (allocate a statement handle)

Organization of this subsection

(1) Function

This CLI function allocates a statement handle (handle for an SQL statement).

(2) Format

signed short a_rdb_SQLAllocStmt
(
  void                          *ConnectionHandle,   /* In  */
  void                         **StatementHandle,    /* Out */
  void                          *Option              /* In  */
)

(3) Arguments

ConnectionHandle

Specifies a connection handle.

StatementHandle

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

Option

Specifies NULL.

(4) Return value

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

  2. If a statement handle is allocated successfully, but the disk containing server message log files or 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

  1. a_rdb_SQLAllocStmt() cannot be executed if connection has not been established.

  2. If the transaction fails to start, the HADB server terminates abnormally.