Показать сообщение отдельно
Старый 09.06.2007, 16:13   #32  
rINT is offline
rINT
Участник
 
31 / 21 (1) +++
Регистрация: 16.11.2004
Попробуйте запустить такой джобик. Для начала на одной таблице. У меня работает
X++:
static void changeAdjustment(Args _args)
{
    Dictionary  dictionary = new Dictionary();
    DictTable   dictTable;
    DictIndex   dictIndex;
    int         i,j;
    Counter     tables, recIdIndexTable;
    TreeNode    treeNode;
    DictField   dictField;
    Set         edt_Set = new Set(Types::Integer);
    ;

    for (i = 1; i <= dictionary.tableCnt(); i++)
    {
        j = 0;
        dictTable = new DictTable(dictionary.tableCnt2Id(i));

        if (!dictTable.isTmp() && !dictTable.isSystemTable() && !dictTable.isView() && !dictTable.isMap())
        {
            for (j = 1; j <= dictTable.fieldCnt(); j++)
            {
                dictField = new DictField(dictTable.id(), dictTable.fieldCnt2Id(j));

                if (edt_Set.in(dictField.typeId()))
                {
                    treeNode = TreeNode::findNode(strfmt("\\Data Dictionary\\Tables\\%1\\Fields\\%2", dictTable.name(), dictField.name()));
                    treeNode.AOTsetProperties("PROPERTIES"+"\n"+"Adjustment #Left"+"\n"+"ENDPROPERTIES");
                    treeNode.AOTsave();
                }
            }
        }
    }
}
Ваи остается только заполнить set идентификаторами всех EDT, включая наследников.