Wednesday 1 October 2014

How to set result set type, concurrency and holdability

java.sql.Connection interface provides below methods to set ResultSet type, concurrency and holdability.

Method
Description
Statement createStatement(int resultSetType, int resultSetConcurrency)
Creates a Statement object that will generate ResultSet objects with the given type and concurrency.
Statement createStatement(int resultSetType, int resultSetConcurrency, int resultSetHoldability)
Creates a Statement object that will generate ResultSet objects with the given type, concurrency, and holdability.
CallableStatement prepareCall(String sql, int resultSetType, int resultSetConcurrency)
Creates a CallableStatement object that will generate ResultSet objects with the given type and concurrency.
CallableStatement prepareCall(String sql, int resultSetType, int resultSetConcurrency, int resultSetHoldability)
Creates a CallableStatement object that will generate ResultSet objects with the given type and concurrency.
PreparedStatement prepareStatement(String sql, int resultSetType, int resultSetConcurrency)
Creates a PreparedStatement object that will generate ResultSet objects with the given type and concurrency.
PreparedStatement prepareStatement(String sql, int resultSetType, int resultSetConcurrency, int resultSetHoldability)
Creates a PreparedStatement object that will generate ResultSet objects with the given type, concurrency, and holdability.
void setHoldability(int holdability)
Changes the default holdability of ResultSet objects created using this Connection object to the given holdability.



Prevoius                                                 Next                                                 Home

No comments:

Post a Comment