Creating a Scrollable Result Set - Java JDBC

Java examples for JDBC:ResultSet

Description

Creating a Scrollable Result Set

Demo Code

import java.sql.Connection;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Statement;

public class Main {
  public static void main(String[] args) throws Exception {
    try {/*from   www.  ja  v a2  s.c  o m*/
      Connection connection = null;

      Statement stmt = connection.createStatement(
          ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_READ_ONLY);

      stmt = connection.createStatement(ResultSet.TYPE_SCROLL_SENSITIVE,
          ResultSet.CONCUR_READ_ONLY);
    } catch (SQLException e) {
    }
  }
}

Related Tutorials