Java examples for JDBC:Database Meta Data
Determining If a Database Supports Transactions
import java.sql.Connection; import java.sql.DatabaseMetaData; import java.sql.SQLException; public class Main { public static void main(String[] argv) { try {/*from w w w. j a v a 2s . c o m*/ Connection connection = null; DatabaseMetaData dmd = connection.getMetaData(); if (dmd.supportsTransactions()) { // Transactions are supported } else { // Transactions are not supported } } catch (SQLException e) { } } }