createStatement(int resultSetType, int resultSetConcurrency)

Syntax:

Statement createStatement(int resultSetType, int resultSetConcurrency) throws SQLException

Creates a Statement object that will generate ResultSet objects with the given type and concurrency. This method is the same as the createStatement method above, but it allows the default result set type and concurrency to be overridden. The holdability of the created result sets can be determined by calling getHoldability().

Parameters:

resultSetType

a result set type; the only supported option is ResultSet.TYPE_FORWARD_ONLY

resultSetConcurrency

a concurrency type; the only supported option is ResultSet.CONCUR_READ_ONLY

Returns:

Type: Statement 

a new Statement object that will generate ResultSet objects with the given type and concurrency

Throws:

SQLException - if a database access error occurs

SQLFeatureNotSupportedException - this method is not supported for the specified result set type or result set concurrency

Reference:

For more information, reference JDBC documentation for: Connection.createStatement(int, int)