11.2.6 getParameterTypeName(int param)
- Organization of this subsection
(1) Function
This method acquires a specified parameter's data type.
(2) Format
public synchronized String getParameterTypeName(int param) throws SQLException
(3) Arguments
- int param
-
Specifies a parameter number (beginning with 1).
(4) Return value
The method returns a String object. The following table shows the return values of the getParameterTypeName method.
|
Parameter's data type (HADB data type) |
Return value (character string returned) |
|---|---|
|
BIGINT# |
"BIGINT" |
|
INTEGER |
"INTEGER" |
|
SMALLINT |
"SMALLINT" |
|
REAL |
"REAL" |
|
DECIMAL, NUMERIC |
"DECIMAL" |
|
DOUBLE PRECISION, FLOAT |
"DOUBLE PRECISION" |
|
CHAR |
"CHAR" |
|
VARCHAR |
"VARCHAR" |
|
STRING |
"STRING" |
|
DATE |
"DATE" |
|
TIME |
"TIME" |
|
TIMESTAMP WITHOUT TIME ZONE |
"TIMESTAMP" |
|
TIMESTAMP WITH TIME ZONE |
"TIMESTAMP WITH TIME ZONE" |
|
BINARY |
"BINARY" |
|
VARBINARY |
"VARBINARY" |
|
ROW |
"ROW" |
|
BOOLEAN |
"BOOLEAN" |
|
UUID |
"UUID" |
- #
-
If the data format of the integer data type is legacy format, "INTEGER" is returned.
(5) Exceptions
If the specified param value is 0 or less, or is greater than the number of parameters, the JDBC driver throws an SQLException.