public static int executeUpdateEx(String sql,Object[] params,String trxName,int timeOut) throws DBException {
  if (sql == null || sql.length() == 0)   throw new IllegalArgumentException("Required parameter missing - " + sql);
  verifyTrx(trxName,sql);
  int no=-1;
  CPreparedStatement cs=ProxyFactory.newCPreparedStatement(ResultSet.TYPE_FORWARD_ONLY,ResultSet.CONCUR_UPDATABLE,sql,trxName);
  try {
    setParameters(cs,params);
    if (timeOut > 0)     cs.setQueryTimeout(timeOut);
    no=cs.executeUpdate();
    if (trxName == null) {
      cs.commit();
    }
  }
 catch (  Exception e) {
    throw new DBException(e);
  }
 finally {
    DB.close(cs);
  }
  return no;
}

public static int executeUpdateEx ( String sql , Object [ ] params , String trxName , int timeOut ) throws DBException { if ( sql == null || sql . length ( ) == 0 ) throw new IllegalArgumentException ( "Required parameter missing - " + sql ) ; verifyTrx ( trxName , sql ) ; int no = - 1 ; CPreparedStatement cs = ProxyFactory . newCPreparedStatement ( ResultSet . TYPE_FORWARD_ONLY , ResultSet . CONCUR_UPDATABLE , sql , trxName ) ; try { setParameters ( cs , params ) ; if ( timeOut > 0 ) cs . setQueryTimeout ( timeOut ) ; no = cs . executeUpdate ( ) ; if ( trxName == null ) { cs . commit ( ) ; } } catch ( Exception e ) { throw new DBException ( e ) ; } finally { DB . close ( cs ) ; } return no ; }
execute update and throw exception .
