Esempio n. 1
0
 protected int execSqlUpdate(String sql) throws Exception {
   Connection con = null;
   try {
     con = getConnection();
     return new QueryRunner().update(con, sql);
   } finally {
     JdbcUtils.close(con);
   }
 }
Esempio n. 2
0
 protected Object[] execSqlQuery(String sql) throws Exception {
   Connection con = null;
   try {
     con = getConnection();
     return (Object[]) new QueryRunner().query(con, sql, new ArrayHandler());
   } finally {
     JdbcUtils.close(con);
   }
 }