Scalable Database Server, HiRDB Version 8 UAP Development Guide

[Contents][Index][Back][Next]

16.12.1 Data types

JDBC's SQL data types and the SQL data types connected via a HiRDB client library do not match perfectly. The JDBC driver maps JDBC's SQL data types and HiRDB's SQL data types. If an unmappable SQL data type is used for data access, the JDBC driver throws an SQLException.

The SQL data types are mapped with the getXXX and setXXX methods in the ResultSet, PreparedStatement, and CallableStatement classes. For the SQL data types and the getXXX and setXXX method mapping rules, see the documentation for the JDBC1.0 standard.

Table 16-19 shows the correspondence of SQL data types between HiRDB and JDBC.

Table 16-19 Correspondence of SQL data types between HiRDB and JDBC

HiRDB's SQL data type JDBC's SQL data type
INTEGER INTEGER
SMALLINT SMALLINT
DECIMAL DECIMAL
FLOAT, DOUBLE PRECISION FLOAT
SMALLFLT, REAL REAL
CHAR CHAR
VARCHAR VARCHAR
NCHAR CHAR
NVARCHAR VARCHAR
MCHAR CHAR
MVARCHAR VARCHAR
DATE DATE
TIME TIME
BLOB LONGVARBINARY
TIMESTAMP TIMESTAMP
BINARY* LONGVARBINARY

* Data is handled in the same way as BLOB.