Hitachi

Hitachi Advanced Database Application Development Guide


8.7.8 getColumnType(int column)

Organization of this subsection

(1) Function

This method acquires a specified column's SQL data type.

(2) Format

public synchronized int getColumnType(int column) throws SQLException

(3) Arguments

int column

Specifies a column number (where the first column is 1).

(4) Return value

The method returns the SQL type from java.sql.Types.

For details about the correspondence between data types and return values of columns, see (1) Correspondence between HADB's data types and JDBC's SQL data types in 7.6.1 Mapping data types.

(5) Exceptions

If the specified column value is 0 or less, or is greater than the number of columns in the table, the JDBC driver throws an SQLException.