Share via


dataObjects Element

Defines all secondary data objects used in a Microsoft Office InfoPath 2007 form.

Type

  xsd:complexType

Structure

Name Description
dataObject (Optional element) Defines a secondary data object that is used in an InfoPath form.

Remarks

The dataObjects element is an optional element of the xDocumentClass element.

The dataObjects element contains a collection of data objects that are used to populate various XML Document Object Models (DOMs) from external data sources. These data objects can be accessed directly (by name) from the XSL Transformation (XSLT)–based view code and any script-based business logic code in the form.

Example

The following is an example of the dataObjects element:

  <xsf:dataObjects>
   <xsf:dataObject 
      name="EmployeeNames" 
      schema="EmployeeNames.xsd" 
      initOnLoad="yes">
      <xsf:query>
         <xsf:adoAdapter 
            connectionString="Provider=Microsoft.Jet.OLEDB.4.0;
               Password=&quot;&quot;;User ID=Admin;
               Data Source=infnwind.mdb;Mode=Share Deny None;
               Extended Properties=&quot;&quot;;..."
            commandText="select [EmployeeID],[LastName],[FirstName] 
               from [Employees] as [Employees]" 
            queryAllowed="yes"
            submitAllowed="yes">
      </xsf:adoAdapter>
			</xsf:query>
		</xsf:dataObject>
	</xsf:dataObjects>