ads

Tuesday, July 31, 2012

Retrieving data from a secondary data source via VSTA

:The problem
How to retrieve data from a secondary data source using code


:The solution
                
           
            XPathNavigator secondNav = DataSources["data source name"].CreateNavigator();
            XPathNodeIterator rows = secondNav.Select("repeating table Xpath", NamespaceManager);

            while (rows.MoveNext())
            {

                string field1= rows.Current.SelectSingleNode("field name", NamespaceManager).Value;

              
             
          }

           

No comments:

Post a Comment