Determining If a Database Supports Batching - Java JDBC

Java examples for JDBC:Database Meta Data

Description

Determining If a Database Supports Batching

Demo Code

import java.sql.Connection;
import java.sql.DatabaseMetaData;
import java.sql.SQLException;

public class Main {
  public static void main(String[] argv) {
    try {/*ww w  .j  a  v a2  s.c  o m*/
      Connection connection = null;
      DatabaseMetaData dmd = connection.getMetaData();
      if (dmd.supportsBatchUpdates()) {
        // Batching is supported
      } else {
        // Batching is not supported
      }
    } catch (SQLException e) {
    }
  }
}

Related Tutorials