Welcome to MSDN Blogs Sign in | Join | Help

List the datasources of a query object

Here is how you can make a list of datasources from a query object.

Query                query;
QueryBuildDataSource qbds;
Counter              child;
List                 listDataSources = new List(types::Class);
ListEnumerator       le;
;

query = new Query(QueryStr(CustBillOfExchangeJourUpdate));

for (child = 1; child <= query.dataSourceCount(); child++)
{
    listDataSources.addEnd(query.dataSourceNo(child));
}

le = listDataSources.getEnumerator();

while (le.moveNext())
{
    qbds = le.current();
    info (TableId2Name(qbds.table()));
}

This posting is provided "AS IS" with no warranties, and confers no rights.
Use of included script samples are subject to the terms specified at http://www.microsoft.com/info/cpyright.htm

Published Wednesday, June 28, 2006 11:38 AM by Palle Agermark

Comments

New Comments to this post are disabled
 
Page view tracker