query Element (dataObject Element)
Associates a data adapter with a data object.
Type
Parent Elements
dataObject |
Defines a secondary data object that is used in a Microsoft Office InfoPath form. |
Child Elements
adoAdapter |
(Optional element) Defines an ActiveX Data Objects (ADO) data adapter that retrieves data from an ADO data source for the specified data object. |
webServiceAdapter |
(Optional element) Defines a Web service data adapter that retrieves data from a Web service for the specified data object. |
xmlFileAdapter |
(Optional element) Defines an .xml file data adapter that retrieves data from an .xml file for the specified data object. |
sharepointListAdapter |
(Optional element) Contains the data adapter information to query a SharePoint list or library. |
Attributes
None.
Definition
<xsd:element name="query" >
<xsd:complexType>
<xsd:choice>
<xsd:element ref="xsf:adoAdapter" />
<xsd:element ref="xsf:webServiceAdapter" />
<xsd:element ref="xsf:xmlFileAdapter" />
<xsd:element ref="xsf:sharepointListAdapter" />
</xsd:choice>
</xsd:complexType>
</xsd:element>
|
Example
The following is an example of the query element:
<xsf:dataObjects>
<xsf:dataObject
name="EmployeeNames"
schema="EmployeeNames.xsd"
initOnLoad="yes">
<xsf:query>
<xsf:adoAdapter
connectionString="Provider=Microsoft.Jet.OLEDB.4.0;
Password="";User ID=Admin;
Data Source=infnwind.mdb;Mode=Share Deny None;
Extended Properties="";..."
commandText="select [EmployeeID],[LastName],[FirstName]
from [Employees] as [Employees]"
queryAllowed="yes"
submitAllowed="yes">
</xsf:adoAdapter>
</xsf:query>
</xsf:dataObject>
</xsf:dataObjects>
|