Code example for Statement

Methods: execute, getResultSet

0
    private void countZip() { 
 
        try { 
            StopWatch sw = new StopWatch();
 
            sStatement.execute("SELECT count(*) from zip where zip > -1");
 
            ResultSet rs = sStatement.getResultSet();
 
            rs.next();
            System.out.println("count time (zip table) " + rs.getInt(1)
                               + " rows  -- " + sw.elapsedTime() + " ms");
        } catch (SQLException e) {}
    } 
 
    private void updateZip() { 
 
        StopWatch        sw        = new StopWatch();
        java.util.Random randomgen = new java.util.Random();
        int              i         = 0;
        boolean          slow      = false;