prepareCall(String sql, int resultSetType, int resultSetConcurrency)

Syntax:

CallableStatement prepareCall(String sql,
        int resultSetType,
        int resultSetConcurrency) throws SQLException

Description:

Creates a CallableStatement object that will generate ResultSet objects with the given type and concurrency. This method is the same as the prepareCall 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:

sql

Type: String 

an SQL statement that may contain one or more '?' parameter placeholders. Typically this statement is specified using JDBC call escape syntax.

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: CallableStatement 

a new default CallableStatement object containing the pre-compiled SQL statement that will produce 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.prepareCall(String, int, int)