A scrollable result set allows the cursor to be moved to any row in the result set. This capability is useful for GUI tools for browsing result sets.
See also e266 Determining If a Database Supports Scrollable Result Sets.
try {
// Create an insensitive scrollable result set
Statement stmt = connection.createStatement(
ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_READ_ONLY);
// Create a sensitive scrollable result set
stmt = connection.createStatement(
ResultSet.TYPE_SCROLL_SENSITIVE, ResultSet.CONCUR_READ_ONLY);
} catch (SQLException e) {
}