Code example for Connection

Methods: createStatement, getMetaData

0
    public void setUp() throws Exception { 
        super.setUp(); 
        Support_SQL.loadDriver(); 
        try { 
            conn = Support_SQL.getConnection();
            meta = conn.getMetaData();
            statement = conn.createStatement();
            createTestTables(); 
        } catch (SQLException e) {
            System.out.println("Error in test setup: "+e.getMessage());
        } 
    } 
 
    public void tearDown() throws Exception { 
        try { 
            conn = Support_SQL.getConnection();
            meta = conn.getMetaData();
            statement = conn.createStatement();
            deleteTestTables(); 
        } catch (SQLException e) {
            System.out.println("Error in teardown: "+e.getMessage());