Code example for Connection

Methods: createStatement

0
    public void setUp() throws Exception { 
        super.setUp(); 
        Support_SQL.loadDriver(); 
        try { 
            conn = Support_SQL.getConnection();
            statement = conn.createStatement();
            createTestTables(); 
        } catch (SQLException e) {
            fail("Unexpected SQLException " + e.toString());
        } 
        DatabaseCreator.fillParentTable(conn);
        DatabaseCreator.fillSimpleTable3(conn);
        DatabaseCreator.fillSimpleTable1(conn);
    } 
 
    public void tearDown() throws Exception { 
        deleteTestTables(); 
        statement.close();
        conn.close();
        super.tearDown(); 
    }