SharepointListAdapterObject Interface

Represents a connection to a SharePoint list or document library.

Namespace:  Microsoft.Office.Interop.InfoPath.SemiTrust
Assembly:  Microsoft.Office.Interop.InfoPath.SemiTrust (in Microsoft.Office.Interop.InfoPath.SemiTrust.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, seeSharepointListAdapter.

Using the members of the SharepointListAdapter interface provides compatibility with InfoPath 2003. To use new members that were added to the SharepointListAdapter2 object model in Microsoft InfoPath 2010, you must cast the object returned by the object to the SharepointListAdapter2 type. For more information, see How to: Use Microsoft.Office.Interop.InfoPath.SemiTrust Members That Are Not Compatible with InfoPath 2003.

The SharePointListAdapter object represents the Microsoft InfoPath 2010 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.SemiTrust Namespace