8.2.7 createStatement(int resultSetType, int resultSetConcurrency, int resultSetHoldability)
- Organization of this subsection
(1) Function
This method creates a Statement object for sending an SQL statement to the HADB server.
(2) Format
public synchronized Statement createStatement(int resultSetType, int resultSetConcurrency, int resultSetHoldability) throws SQLException
(3) Arguments
- int resultSetType
-
Specifies a result set type.
- int resultSetConcurrency
-
Specifies the concurrent processing mode.
- int resultSetHoldability
-
Specifies the holdability of the ResultSet object.
(4) Return value
The method returns the Statement object.
(5) Exceptions
The JDBC driver throws an SQLException in the following cases:
-
The Connection object is closed.
-
Creation of the Statement object resulted in an error.
-
A value other than a ResultSet literal is specified for the result set type.
-
A value other than a ResultSet literal is specified for concurrent processing mode.
-
A value other than a ResultSet literal is specified for the holdability of the ResultSet object.
-
A database access error occurs.
(6) Notes
-
If ResultSet.TYPE_SCROLL_SENSITIVE is specified for the result set type, this JDBC driver changes it to ResultSet.TYPE_SCROLL_INSENSITIVE, and then sets an SQLWarning.
-
For concurrent processing mode, the JDBC driver supports only ResultSet.CONCUR_READ_ONLY. If ResultSet.CONCUR_UPDATABLE is specified, the JDBC driver changes it to ResultSet.CONCUR_READ_ONLY, and then sets an SQLWarning.
-
For the holdability of the ResultSet object, the JDBC driver supports only ResultSet.HOLD_CURSORS_OVER_COMMIT. If ResultSet.CLOSE_CURSORS_AT_COMMIT is specified, the JDBC driver changes it to ResultSet.HOLD_CURSORS_OVER_COMMIT, and then sets an SQLWarning.