Nonstop Database, HiRDB Version 9 UAP Development Guide
The table below shows the correspondence between ODBC function data types and server HiRDB data types.
ODBC function data type refers to an SQL data type that is specified in an argument of an ODBC function.
Table 14-4 ODBC function data types and HiRDB data types
Classification | ODBC data type | HiRDB data type | Description | Availability |
---|---|---|---|---|
Character data | SQL_CHAR | CHAR(n) | Fixed-length character string | U |
SQL_VARCHAR | VARCHAR(n) | Variable-length character string | U | |
SQL_LONGVARCHAR | VARCHAR(n) | Variable-length character string | U | |
SQL_CHAR | NCHAR(n) | Fixed-length national character string NATIONAL CHARACTER(n) | U | |
SQL_VARCHAR | NVARCHAR(n) | Variable-length national character string | U | |
SQL_CHAR | MCHAR(n) | Fixed-length mixed character string | U | |
SQL_VARCHAR | MVARCHAR(n) | Variable-length mixed character string | U | |
Numeric data | SQL_DECIMAL | DEC[IMAL](p,s) | Fixed-point number Precision (total number of digits) = p, Scale (number of digits below the decimal point) = s 1 |
U |
SQL_NUMERIC | -- | NU | ||
SQL_SMALLINT | SMALLINT | Integer from -32,768 to 32,767 | U | |
SQL_INTEGER | INTEGER | Integer from -2,147,483,648 to 2,147,483,647 | U | |
SQL_TINYINT | -- | Integer from -256 to 255 | NU | |
SQL_BIGINT | -- | 1-digit sign and 19-digit integer | NU | |
SQL_REAL | SMALLFLT,REAL | Single-precision floating-point number | U | |
SQL_FLOAT | FLOAT, DOUBLE PRECISION | Double-precision floating-point number | U | |
SQL_DOUBLE | FLOAT, DOUBLE PRECISION | Double-precision floating-point number | U | |
SQL_BIT | -- | Bit | NU | |
SQL_BINARY | -- | Fixed-length binary data | NU | |
SQL_LONGVARBINARY | BINARY(n) | Variable-length binary data | U | |
SQL_LONGVARBINARY | BLOB | Variable-length binary data | U | |
Date and time data | SQL_TYPE_DATE | DATE | Date | U |
SQL_TYPE_TIMESTAMP | TIMESTAMP | Date/time | U | |
SQL_TYPE_TIME | TIME | Time | U | |
--# | INTERVAL YEAR TO DAY | Date interval | NU | |
SQL_INTERVAL_HOUR_TO_SECOND | INTERVAL HOUR TO SECOND | Time interval | U | |
User-defined type | -- | Abstract data type | Abstract data type | NU |
When a UAP uses ODBC functions to access the HiRDB system in the server, not all HiRDB facilities are available to the UAP. The following table lists the facilities that can be used by such a UAP.
Table 14-5 Available facilities
Facility | Availability |
---|---|
Obtaining special column information | -- |
Obtaining index information | U |
Using date and time data types | U#1 |
Using repetition columns | NU#3 |
Using array columns | -- |
Obtaining table and column headers | -- |
Asynchronous processing | NU |
Using the escape character for the LIKE predicate | U |
Obtaining an updated row count | U |
Setting the timeout value for logging in | NU |
Using Japanese data types | U#2 |
Executing definition SQL statements | U |
SELECT C1[1],C1[2] FROM T1 A SELECT C1 FROM T1 -- INSERT INTO T1 VALUES(ARRAY[?,?]) A INSERT INTO T1 VALUES(?) --
The SQLGetCursorName function obtains the user cursor name that was set with the SQLSetCursorName function. If no cursor name has been set, the SQLGetCursorName function cannot obtain a system-defined cursor. Therefore, set an appropriate user cursor name to update or delete an item with a cursor.
The options that can be set with the SQLSetConnectOption or SQLGetConnectOption function are limited. The following table shows the options that can be set.
Table 14-6 Options that can be set with the SQLSetConnectOption and SQLGetConnectOption functions
Option | Setting |
---|---|
SQL_ACCESS_MODE | SQL_MODE_READ_WRITE |
SQL_AUTOCOMMIT | SQL_AUTOCOMMIT_OFF or SQL_AUTOCOMMIT_ON |
SQL_LOGIN_TIMEOUT | -- |
SQL_TRANSLATE_DLL | -- |
SQL_TRANSLATE_OPTION | -- |
SQL_TXN_ISOLATION | -- |
All Rights Reserved. Copyright (C) 2011, Hitachi, Ltd.