Friday, May 25, 2012

Code for Traverse between Tables and all the fields

With reference of Bineet's blog here I found the code for Traverse between tables and all the fields.


//Travese between tables and for each table traverse between all the fields
static void TeeNode_traverse(Args _args)
{
    TreeNode            treeNode, treeNodeTable;
    TreeNodeIterator    iterator;
    void traverseFields(TreeNode _treeNode)
    {
        TreeNode parentNode;
        parentNode = _treeNode.AOTfindChild(‘Fields’);
        //treeNodeTable = _treeNode.AOTfirstChild();
        iterator = parentNode.AOTiterator();
        parentNode = iterator.next();
        while(parentNode)
        {
            //treeNodeTable = treeNodeTable.AOTfirstChild();
            parentNode = iterator.next();
        }
    }
    ;
    treeNode = TreeNode::rootNode();
    treeNode = treeNode.AOTfirstChild();
    treeNodeTable = treeNode.AOTfindChild(‘Tables’);
    treeNodeTable = treeNodeTable.AOTfirstChild();
    while(treeNodeTable)
    {
        traverseFields(treeNodeTable);
        treeNodeTable = treeNodeTable.AOTnextSibling();
    }
}

No comments:

Post a Comment

I will appreciate your comments !

How to enable new Microsoft teams - Public Preview!

New Microsoft Teams is just AWESOME, quick but useful post below shows how you have this preview feature to make your life EASY!  Open Micr...