April 05
Prof. Ismael H. F. Santos -  ismael@tecgraf.puc-rio.br                                                          2
Exemplo de atualização
ntry {
n  con.setAutoCommit(false);
n  Statement stat = con.createStatement();
n  stat.addBatch("INSERT INTO xy VALUES ('0','0')");
n  stat.addBatch("INSERT INTO xy VALUES ('1','1')");
n  stat.addBatch("INSERT INTO xy VALUES ('2','2')");
n  int[] counts = stat.executeBatch();
n  con.commit();
n} catch (BatchUpdateException ex) {
n  int[] counts = ex.getUpdateCounts();
n  ...
n}
ncon.setAutoCommit(true);