Hitachi

Hitachi Advanced Database Application Development Guide


19.4.8 a_rdb_SQLExecDirect() (preprocess and execute an SQL statement)

Organization of this subsection

(1) Function

This CLI function preprocesses and executes an SQL statement. The function can execute the following SQL statements:

#

a_rdb_SQLExecDirect() cannot be executed if a dynamic parameter is specified.

(2) Format

signed short a_rdb_SQLExecDirect
(
  void                          *ConnectionHandle,   /* In */
  void                          *StatementHandle,    /* In */
  char                          *StatementText,      /* In */
  void                          *Option              /* In */
)

(3) Arguments

ConnectionHandle

Specifies a connection handle.

StatementHandle

Specifies a statement handle.

StatementText

Specifies the text of the SQL statement that is to be preprocessed and executed, expressed as a character string in C or C++.

Option

Specifies NULL.

(4) Return value

  1. If a_rdb_SQLExecDirect() terminates normally, a_rdb_RC_SQL_SUCCESS or a_rdb_RC_SQL_NO_DATA is returned.

  2. If the SQL statement is preprocessed and executed 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

a_rdb_SQLExecDirect() cannot be executed in the following cases: