Assembly: Microsoft.Office.InfoPath (in microsoft.office.infopath.dll)
Each DataSource object in the DataSourceCollection corresponds to data obtained from some external source of data using an associated data connection. The data connection represents the connection to a database or Web service and the data source represents the storage of the returned XML data. The QueryConnection property of the DataSource class provides access to a DataConnection object that represents the particular data connection that was used to connect to the data source.
The DataSourceCollection class can only be used to get the count of DataSource objects that it contains or to return a reference to a DataSource object in the collection. It cannot be used to create, add, or remove DataSource objects.
The DataSourceCollection class corresponds to the DataObjectsCollection interface in the Microsoft InfoPath 2003 object model.