int j=0;
try{
con=source.getConnection();
stmt=con.createStatement();
con.setAutoCommit(false);
j=stmt.executeUpdate(strSql);
if(j>0){
con.commit();
}else{
con.rollback();
}
}catch(Exception e){
System.out.println("Delete error:"+e.getMessage());
}finally{
if (stmt != null) {
stmt.close();
}
if (con != null) {
con.close();
}
}
return j;
}
}






