Determining If a Result Set Is Updatable - Java JDBC

Java examples for JDBC:ResultSet

Description

Determining If a Result Set Is Updatable

Demo Code

import java.sql.ResultSet;
import java.sql.SQLException;

public class Main {
  public static void main(String[] argv) {
    try {//from w  w  w. j a va 2  s  . com
      ResultSet resultSet = null;
      // Get concurrency of the result set
      int concurrency = resultSet.getConcurrency();

      if (concurrency == ResultSet.CONCUR_UPDATABLE) {
          // Result set is updatable
      } else {
          // Result set is not updatable
      }
  } catch (SQLException e) {
  }
  }
}

Related Tutorials