SharePointListAdapterRWObject interface

Represents a data connection for retrieving data from 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("096cd635-0786-11d1-95fa-0080c78ee3bb")> _
Public Interface SharePointListAdapterRWObject _
    Inherits SharePointListAdapterRW
'Usage
Dim instance As SharePointListAdapterRWObject
[GuidAttribute("096cd635-0786-11d1-95fa-0080c78ee3bb")]
public interface SharePointListAdapterRWObject : SharePointListAdapterRW

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, seeSharePointListAdapterRW

Note

Code written with the members implemented by the SharePointListAdapterRWObject class is not compatible with a data connection to a SharePoint list or document library created in InfoPath 2003 or InfoPath 2007, with a data connection in a new form template created in InfoPath with one of the InfoPath 2007 Form Templates, or with a data connection converted with the Convert to Previous Version button in the Data Connections dialog box. If you do not need to maintain compatibility with an earlier version of InfoPath and want to write code with members implemented by the SharePointListAdapterRWObject class, you can convert the data connection with the Convert to Current Version button in the Data Connections dialog box.

The SharePointListAdapterRW object represents a Microsoft InfoPath data connection for retrieving from a SharePoint list or document library.

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

Examples

SharePointListAdapterRWObject SPList = ((SharePointListAdapterRWObject)thisXDocument.DataAdapters["SharePoint list"]);
thisXDocument.UI.Alert(SPList.SiteUrl);
SPList.Query();

In the following example, a reference to the SharePointListAdapterRW 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:

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

After the reference has been set, you can use the methods of the SharePointListAdapterRW object as shown in the following example, which calls the Query() method to re-query the SharePoint list or library to update the DOM property of the data adapter object:

adapter.Query();

See also

Reference

SharePointListAdapterRWObject members

Microsoft.Office.Interop.InfoPath.SemiTrust namespace