SharepointListAdapterObject Interface
Collapse the table of content
Expand the table of content
This documentation is archived and is not being maintained.

SharepointListAdapterObject Interface (Microsoft.Office.Interop.InfoPath)

Represents a connection to a SharePoint list or document library.

Namespace: Microsoft.Office.Interop.InfoPath
Assembly: Microsoft.Office.Interop.InfoPath (in

public interface SharepointListAdapterObject : SharepointListAdapter

This type is a wrapper for a coclass that is required by managed code for COM interoperability. Use this type to access the members of the COM interface implemented by this coclass. For information about the COM interface, including a link to descriptions of its members, see SharepointListAdapter2.

The SharePointListAdapter object represents the Office InfoPath data adapter for retrieving data from a SharePoint list or document library.

For a secondary data source, the SharePointListAdapter object is accessible through the QueryAdapter property of DataSourceObject object. Data adapter objects are accessible through the DataAdapters property of the XDocument object.

SharepointListAdapter SPList = ((SharepointListAdapter)thisXDocument.DataAdapters[“SharePoint list”]);

In the following example, a reference to the SharePointListAdapter object is accessed through the QueryAdapter property of a data adapter object by passing the name of the data adapter object to the Item property of the DataAdaptersCollection collection:

SharepointListAdapter adapter;
adapter = (SharepointListAdapter) thisXDocument.DataAdapters["Announcements"];

After the reference has been set, you can use the methods of the SharePointListAdapter object as shown in the following example, which re-queries the SharePoint list or library to update the DOM property of the data adapter object:

© 2016 Microsoft