Code example for Connection

Methods: createStatement

0
 
    public void setUp() throws Exception { 
        super.setUp(); 
        Support_SQL.loadDriver(); 
        conn = Support_SQL.getConnection();
        statement = conn.createStatement();
        createTestTables(); 
 
    } 
 
    public void tearDown() throws Exception { 
        deleteTestTables(); 
        statement.close();
        conn.close();
        super.tearDown(); 
    } 
 
    public void createTestTables() { 
        try { 
            DatabaseMetaData meta = conn.getMetaData();
            ResultSet userTab = meta.getTables(null, null, null, null);