19.4.10 a_rdb_SQLFetch() (fetch a row)
- Organization of this subsection
(1) Function
This CLI function advances the cursor to the next row. If columns are bound, the function reads the column values on the row pointed to by the cursor into the fetch target specified in the fetch target list.
(2) Format
signed short a_rdb_SQLFetch ( void *ConnectionHandle, /* In */ void *StatementHandle, /* In */ void *Option /* In */ )
(3) Arguments
- ConnectionHandle
-
Specifies a connection handle.
- StatementHandle
-
Specifies a statement handle.
- Option
-
Specifies NULL.
(4) Return value
-
If a_rdb_SQLFetch() terminates normally, a_rdb_RC_SQL_SUCCESS or a_rdb_RC_SQL_NO_DATA is returned.
-
If a row is fetched successfully, but the disk containing server message log files or client message log files has become full, a_rdb_RC_SQL_WARNING is returned.
-
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_SQLFetch() cannot be executed in the following cases:
-
Connection has not been established.
-
An invalid statement handle is specified.
-
-
You must first use a_rdb_SQLExecute() to open the cursor that is to be used.