Represents a data source in a form template.
Assembly: Microsoft.Office.InfoPath (in Microsoft.Office.InfoPath.dll)
A object corresponds to one of the sources of stored data associated with an InfoPath form template. A object can represent either the form template's primary (main) data source, or a secondary data source obtained from some external source of data using an associated data connection (referred to as a data adapter in the first release of Microsoft InfoPath). Working with a form's main data source provides access to the underlying XML document of the form, whereas working with a secondary data source provides access to data retrieved from an external source of data such as a Web Service query.
The object provides properties and methods that can be used to programmatically interact with the stored data, as well as providing access to the associated data connection for secondary data sources. A object can be accessed using the DataSources property of the XmlForm class.
For secondary data sources, a object acts as an intermediary between the form and the data connection that is used to obtain data from an external data source, such as a connection to a Microsoft Access or Microsoft SQL Server database, an .xml file, or an XML Web service. The type of data connection object used depends on the type of external data connection used to acquire the data. The object provides a common set of properties and methods that can be used for all types of data connection objects, and each of the data connection objects provides its own set of properties and methods.
Microsoft InfoPath 2010 supports the following kinds of data connections:
A connection to query or submit to an external data source that is registered in the Business Data Connectivity service (BDC) a server running SharePoint Foundation 2010 or SharePoint Server 2010 represented by the BdcQueryConnection or BdcSubmitConnection objects.
A connection to query or submit to a SharePoint list represented by the SharepointListRWQueryConnection or SharepointListRWSubmitConnection objects.
A connection to a Web service represented by the WebServiceConnection object.
A connection to submit by e-mail represented by the EmailSubmitConnection object.
The class corresponds to the DataObject interface in the Microsoft InfoPath 2003 object model.