time exceeded

2009-08-19
2013-05-02
  •    
    Generate Invoices (manual)

    I already have almost 24 hours and thus not complete.

    Number of entries: 20,000 records
       
    not much time?

    Rodolfo

     
    • albert
      albert
      2009-08-20

      ??  We use  <IsSelected> for identify ,,
      but sql update and update will be dead lock for multiply user env.....

              //    Reset Selection
              String sql = "UPDATE C_Order SET IsSelected = 'N' WHERE IsSelected='Y'"
                  + " AND AD_Client_ID=" + Env.getCtx().getAD_Client_ID()
                  + " AND AD_Org_ID=" + Env.getCtx().getAD_Org_ID();
              int no = DB.executeUpdate(sql, trxName);
              log.config("Reset=" + no);

              //    Set Selection
              sql = "UPDATE C_Order SET IsSelected = 'Y' WHERE " + m_whereClause;
              no = DB.executeUpdate(sql, trxName);
              if (no == 0)
              {
                  String msg = "No Invoices";     //  not translated!
                  log.config(msg);
                  info.setText(msg);
                  return;
              }

      we can use "" instance  for prevent dead lock.....

              //    Prepare Process
              int AD_Process_ID = 134;  // HARDCODED    C_InvoiceCreate
              MPInstance instance = new MPInstance(Env.getCtx(), AD_Process_ID, 0);