This documentation is archived and is not being maintained.

adoAdapterExtension Element

Office 2007

Specifies extended information for the corresponding adoAdapter element in the manifest.xsf.

Usage


<adoAdapterExtension
	ref="xsf:xdTitle"
	submitAdapterName="xsf:xdTitle"
 queryKey="xsd:string"
 queryFile="xsd:string"
/>

Element Information

Element type xsd:complexType
Namespace xsf2

Elements and Attributes

Parent Elements

ElementDescription
dataConnectionsContains elements that specify data connections.

Child Elements

ElementDescription
connectoidSpecifies information that describes a data connection file.

Attributes

AttributeTypeRequiredDescriptionPossible Values
refxdTitleRequiredSpecifies the name attribute of the adoAdapter element that is extended by this element.

Note   This element or attribute is optional in the form definition file (.xsf) of a form template deployed as a browser-compatible form to a server running InfoPath Forms Services.
String
submitAdapterNamexdTitleOptionalSpecifies the name of the database submit connection to be used when referring to the data connection in custom code.

Note   This element or attribute is optional in the form definition file (.xsf) of a form template deployed as a browser-compatible form to a server running InfoPath Forms Services.
String
queryKeyxsd:stringOptionalSpecifies a string value generated by InfoPath and maintained in the manifest.xsf file that dictates whether the data cached in the form template at design time is applicable for the current state of the data connection.

Note   This element or attribute is optional in the form definition file (.xsf) of a form template deployed as a browser-compatible form to a server running InfoPath Forms Services.
String
queryFilexsd:stringOptionalSpecifies the name an XML file included in the form template that contains the data cached at design time if the user selected the Store a copy of the data in the form template check box in the Data Connection Wizard. The data in the XML file will be used by InfoPath if the queryKey value generated at runtime matches the value stored at design time.
Note   This element or attribute is optional in the form definition file (.xsf) of a form template deployed as a browser-compatible form to a server running InfoPath Forms Services.
String
Bb265156.vs_note(en-us,office.12).gif  Note
InfoPath uses the queryKey value for all data connections that cache the query data in the form template, not only parametrized secondary data connections. This is because the data connection properties can be changed by business logic code at run time. For example, a secondary ADO query connection's connection string may have changed at run time, so the queryKey value is necessary to validate the applicability of the cached data. Similarly, the URL for a Web service or XML document query data connection can be changed from code at run time.

Definition


<xsd:element name="adoAdapterExtension">
   <xsd:complexType>
      <xsd:sequence>
         <xsd:element ref="xsf2:connectoid" minOccurs="0" />
      </xsd:sequence>
      <xsd:attribute name="ref" type="xsf:xdTitle" use="required" />
      <xsd:attribute name="submitAdapterName" type="xsf:xdTitle" use="optional" />
      <xsd:attributeGroup ref="xsf2:queryKeyFile" />
   </xsd:complexType>
</xsd:element>

Remarks

InfoPath adds the adoAdapterExtension element to the manifest.xsf file when a database data connection is defined by using one or more of the following features:

  • The Store a copy of the data in the form template check box is selected in the Data Connection Wizard.
  • The data connection settings are specified from from a data connection file (.udcx) in a data conection library.
  • Submitting to a database is enabled.

In Office InfoPath 2003, to work with the primary database connection from code, you use the single ADOAdapter object with its Query and Submit methods. In Microsoft Office InfoPath 2007, to work with the primary database connection from managed code, you use the AdoQueryConnection and AdoSubmitConnection objects, each of which has its corresponding Execute method. The submitadapterName attribute specifies the value returned by the Name property of the AdoSubmitConnection object, which is used as an index into the DataConnectionCollection when referring to the AdoSubmitConnection object in business logic code.

Note   This element or attribute is optional in the form definition file (.xsf) of a form template deployed as a browser-compatible form to a server running InfoPath Forms Services.

Example

The following is an example of the adoAdapterExtension element.


<xsf2:adoAdapterExtension ref="Main connection" submitAdapterName="Main connection submit"></xsf2:adoAdapterExtension>


Show: