_XDocument2.DataAdapters property

Gets a reference to the DataAdaptersCollection collection that is associated with a form.

Namespace:  Microsoft.Office.Interop.InfoPath.SemiTrust
Assembly:  Microsoft.Office.Interop.InfoPath.SemiTrust (in Microsoft.Office.Interop.InfoPath.SemiTrust.dll)

Syntax

'Declaration
ReadOnly Property DataAdapters As DataAdaptersCollection
    Get
'Usage
Dim instance As _XDocument2
Dim value As DataAdaptersCollection

value = instance.DataAdapters
DataAdaptersCollection DataAdapters { get; }

Property value

Type: Microsoft.Office.Interop.InfoPath.SemiTrust.DataAdaptersCollection

Remarks

Important

This member can be accessed only by forms running in the same domain as the currently open form, or by forms that have been granted cross-domain permissions.

Examples

In the following example, the DataAdapters property of the XDocument object is used to set a reference to a data adapter called "Main query":

object objDataAdapter;
objDataAdapter = thisXDocument.DataAdapters["Main query"];

See also

Reference

_XDocument2 interface

_XDocument2 members

Microsoft.Office.Interop.InfoPath.SemiTrust namespace