19.1.1 List of CLI functions
HADB provides the CLI functions listed in the table below.
No. |
Classification |
CLI function |
Function |
|
---|---|---|---|---|
1 |
CLI functions for connecting to and disconnecting from the HADB server |
Allocates a connection handle. |
||
2 |
Establishes a connection with the HADB server. |
|||
3 |
Sets connection attributes. |
|||
4 |
Closes a connection. |
|||
5 |
Releases a connection handle. |
|||
6 |
CLI functions for controlling transactions |
Cancels the current SQL processing. |
||
7 |
Terminates the transaction. |
|||
8 |
CLI functions for execution of SQL statements |
Allocating and releasing a statement handle |
Allocates a statement handle. |
|
9 |
Releases a statement handle. |
|||
10 |
Preprocessing and executing an SQL statement, manipulating a cursor, and fetching rows |
Preprocesses an SQL statement. |
||
11 |
Executes a preprocessed SQL statement. |
|||
12 |
Preprocesses and executes an SQL statement. |
|||
13 |
Advances to the next row the cursor that points to the next row to be fetched, and then reads the column values in that row into the fetch target specified in the fetch target list. |
|||
14 |
Closes the cursor. |
|||
15 |
Retrieval result columns |
Acquires the number of retrieval result columns. |
||
16 |
Acquires information about the retrieval result columns. |
|||
17 |
Binds (associates) the retrieval result columns with an area for storing the values fetched from those columns. |
|||
18 |
Dynamic parameters |
Acquires the number of dynamic parameters in an SQL statement. |
||
19 |
Acquires an SQL statement's dynamic parameter information. |
|||
20 |
Binds (associates) the dynamic parameters in an SQL statement with an area for specifying their values. |
|||
21 |
Binds (associates) the dynamic parameters in an SQL statement with an area for specifying their values. This CLI function binds the values of multiple sets of dynamic parameters in an SQL statement in batch mode. |
|||
22 |
CLI functions for data type conversion |
Converting character string data in C or C++ to SQL data types |
Converts character string data in C or C++ (binary or hexadecimal) to SQL BINARY type data. |
|
23 |
Converts character string data in C or C++ to SQL DATE type data. |
|||
24 |
Converts character string data in C or C++ to SQL DECIMAL type data. |
|||
25 |
Converts character string data in C or C++ to SQL TIME type data. |
|||
26 |
Converts character string data in C or C++ to SQL TIMESTAMP type data. |
|||
27 |
Converts character string data in C or C++ (binary or hexadecimal) to SQL VARBINARY type data. |
|||
28 |
Converting SQL data types to character string data in C or C++ |
Converts SQL BINARY-type data to character string data in C or C++. |
||
29 |
Converts SQL DATE-type data to character string data in C or C++. |
|||
30 |
Converts SQL DECIMAL-type data to character string data in C or C++. |
|||
31 |
Converts SQL TIME-type data to character string data in C or C++. |
|||
32 |
Converts SQL TIMESTAMP-type data to character string data in C or C++. |
|||
33 |
Converts SQL VARBINARY-type data to character string data in C or C++. |
To use these CLI functions, you must load the header files and the client library provided by the HADB client into a source program coded in C or C++. The following table lists the header files and the client library provided by the HADB client.
No. |
CLI function to be used |
Header file and client library to be used |
|
---|---|---|---|
Header file |
Client library |
||
1 |
CLI functions for connecting to and disconnecting from the HADB server |
|
|
2 |
CLI functions for controlling transactions |
||
3 |
CLI functions for execution of SQL statements |
||
4 |
CLI functions for data type conversion |
$ADBDIR/include/adbcnv.h |
Note: The header file that is required depends on the CLI function being used.