wrote by Jimmy on DEC 27th 2010

//Synchronisation Error: Cannot execute a data definition language command on ()
static void Jimmy_DbSynchronizeForce(Args _args)
{    
    Dictionary              dict;
    int                     idx, lastIdx, totalTables;
    TableId                 tableId;
    Application             application;
    SysOperationProgress    progress;
    StackBase               errorStack;
    ErrorTxt                errorTxt;
    ;
    application = new Application();
    dict        = new Dictionary();
    totalTables = dict.tableCnt();
    progress    = new SysOperationProgress();
    progress.setTotal(totalTables);
    progress.setCaption("@SYS90206");
    errorStack = new StackBase(Types::String);
    lastIdx = 0;
    try
    {
        for (idx = lastIdx+1; idx <= totalTables; idx++)
        {
            tableId = dict.tableCnt2Id(idx);
            progress.setText(strfmt("%1 - completed %2",dict.tableName(tableId),idx / totalTables * 100));
            lastIdx = idx;
            application.dbSynchronize(tableId, false, true, false);
            progress.incCount();
        }
    }
    catch (Exception::Error)
    {
         errorTxt = strFmt("Error in table '%1' (%2)", tableId, dict.tableName(tableId));
         errorStack.push(errorTxt);
         retry;
    }
    setPrefix("@SYS86407");
    errorTxt = errorStack.pop();
    while (errorTxt)
    {
        error(errorTxt);
        errorTxt = errorStack.pop();
    }
}

 

相关文章:

  • 2022-01-02
  • 2021-09-17
  • 2021-09-24
  • 2021-10-18
  • 2022-01-03
  • 2021-09-15
  • 2021-10-06
  • 2021-06-08
猜你喜欢
  • 2021-11-09
  • 2021-12-20
  • 2021-10-23
  • 2021-06-17
  • 2022-12-23
  • 2022-01-16
  • 2021-07-04
相关资源
相似解决方案