SharepointListAdapterObject interface

Represents a connection to a SharePoint list or document library.

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

Syntax

'Declaration
<GuidAttribute("096CD69A-0786-11D1-95FA-0080C78EE3BB")> _
Public Interface SharepointListAdapterObject _
    Inherits SharepointListAdapter
'Usage
Dim instance As SharepointListAdapterObject
[GuidAttribute("096CD69A-0786-11D1-95FA-0080C78EE3BB")]
public interface SharepointListAdapterObject : SharepointListAdapter

Remarks

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, seeSharepointListAdapter2.

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.

Examples

SharepointListAdapter SPList = ((SharepointListAdapter)thisXDocument.DataAdapters[“SharePoint list”]);
thisXDocument.UI.Alert(SPList.SiteUrl);
SPList.Query();

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:

adapter.Query();

See also

Reference

SharepointListAdapterObject members

Microsoft.Office.Interop.InfoPath namespace