DataObjects Object


DataObjects Object

The DataObjects object represents a link to the data adapter of a secondary data source. DataObjects serves as the intermediary between InfoPath and the data adapter object that is used to access data contained in an external data source. External data is retrieved from an XML Web Service, SQL Server, Microsoft Access, or XML file. The type of data adapter used depends on the type of data source. DataObjects provides a common set of properties and methods , as shown in Table A.10. Each specific adapter provides its own set of properties that is accessed through the QueryAdapter object.

Table A.10: Properties and Methods of The DataObjects Object.

Name

Security Level

Description

Query Method

2

Reads the data from the associated data adapter into an XML DOM associated with the DataObjects

Name Property

2

Returns a read-only string that contains the name of the current DataObjects

QueryAdapter Property

2

Is a read-only property that provides a reference to the data adapter object used in the secondary data source

DOM Property

2

Returns a reference to the XML DOM associated with the current DataObjects

The following example returns the entire DOM of a secondary data source into a string:

 var strEmployeeXML; strEmployeeXML = XDocument.DataObjects("EmployeeNames").DOM.XML; 



Programming Microsoft Infopath. A Developers Guide
Programming Microsoft Infopath: A Developers Guide
ISBN: 1584504536
EAN: 2147483647
Year: 2006
Pages: 111
Authors: Thom Robbins

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net