List of usage examples for java.sql Connection close
void close() throws SQLException;
Connection
object's database and JDBC resources immediately instead of waiting for them to be automatically released. From source file:TableMaker.java
public static void main(String[] args) throws Exception { Class.forName(jdbcDriver);//from w w w . j a va 2s .c om url += dbName; Connection con = null; Statement stmt = null; con = DriverManager.getConnection(url); stmt = con.createStatement(); stmt.execute(SQLCreate); con.close(); if (con != null) { con.close(); } if (stmt != null) { stmt.close(); } }
From source file:Main.java
public static void main(String[] args) throws Exception { Connection conn = getHSQLConnection(); DatabaseMetaData md = conn.getMetaData(); // Get the list of system functions System.out.println(md.getTimeDateFunctions()); conn.close(); }
From source file:Main.java
public static void main(String[] args) throws Exception { Connection conn = getHSQLConnection(); DatabaseMetaData md = conn.getMetaData(); System.out.println("supportsSubqueriesInComparisons - " + md.supportsSubqueriesInComparisons()); conn.close(); }
From source file:Main.java
public static void main(String[] args) throws Exception { Connection conn = getHSQLConnection(); DatabaseMetaData md = conn.getMetaData(); System.out.println("supportsAlterTableWithAddColumn - " + md.supportsAlterTableWithAddColumn()); conn.close(); }
From source file:Main.java
public static void main(String[] args) throws Exception { Connection conn = getHSQLConnection(); DatabaseMetaData md = conn.getMetaData(); System.out.println("supportsSubqueriesInQuantifieds - " + md.supportsSubqueriesInQuantifieds()); conn.close(); }
From source file:Main.java
public static void main(String[] args) throws Exception { Connection conn = getHSQLConnection(); DatabaseMetaData md = conn.getMetaData(); System.out.println("supportsSchemasInProcedureCalls - " + md.supportsSchemasInProcedureCalls()); conn.close(); }
From source file:Main.java
public static void main(String[] args) throws Exception { Connection conn = getHSQLConnection(); DatabaseMetaData md = conn.getMetaData(); System.out.println("supportsOpenCursorsAcrossCommit - " + md.supportsOpenCursorsAcrossCommit()); conn.close(); }
From source file:Main.java
public static void main(String[] args) throws Exception { Connection conn = getHSQLConnection(); DatabaseMetaData md = conn.getMetaData(); System.out.println("supportsCatalogsInProcedureCalls - " + md.supportsCatalogsInProcedureCalls()); conn.close(); }
From source file:Main.java
public static void main(String[] args) throws Exception { Connection conn = getHSQLConnection(); DatabaseMetaData md = conn.getMetaData(); System.out.println("supportsAlterTableWithDropColumn - " + md.supportsAlterTableWithDropColumn()); conn.close(); }
From source file:Main.java
public static void main(String[] args) throws Exception { Connection conn = getHSQLConnection(); DatabaseMetaData md = conn.getMetaData(); System.out.println("supportsSchemasInDataManipulation - " + md.supportsSchemasInDataManipulation()); conn.close(); }