SharepointListAdapterObject 接口
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
表示一个到 SharePoint 列表或文档库的连接。
public interface class SharepointListAdapterObject : Microsoft::Office::Interop::InfoPath::SharepointListAdapter
[System.Runtime.InteropServices.Guid("096CD69A-0786-11D1-95FA-0080C78EE3BB")]
public interface SharepointListAdapterObject : Microsoft.Office.Interop.InfoPath.SharepointListAdapter
type SharepointListAdapterObject = interface
interface SharepointListAdapter
Public Interface SharepointListAdapterObject
Implements SharepointListAdapter
- 派生
- 属性
- 实现
示例
<span class="label">SharepointListAdapter</span> SPList = ((<span class="label">SharepointListAdapter</span>)thisXDocument.DataAdapters[“SharePoint list”]);
thisXDocument.UI.Alert(SPList.SiteUrl);
SPList.Query();
<p>In the following example, a reference to the <strong>SharePointListAdapter</strong> object is accessed through the <xref data-throw-if-not-resolved="true" uid="Microsoft.Office.Interop.InfoPath.DataObject.QueryAdapter"></xref> property of a data adapter object by passing the name of the data adapter object to the <xref data-throw-if-not-resolved="true" uid="Microsoft.Office.Interop.InfoPath.DataAdapters.Item(System.Object)"></xref> property of the <xref data-throw-if-not-resolved="true" uid="Microsoft.Office.Interop.InfoPath.DataAdaptersCollection"></xref> collection:</p>
<span class="label">SharepointListAdapter</span> adapter;
adapter = (<span class="label">SharepointListAdapter</span>) thisXDocument.DataAdapters["Announcements"];
<p>After the reference has been set, you can use the methods of the <strong>SharePointListAdapter</strong> object as shown in the following example, which re-queries the SharePoint list or library to update the <xref data-throw-if-not-resolved="true" uid="Microsoft.Office.Interop.InfoPath.DataObject.DOM"></xref> property of the data adapter object:</p>
<code>adapter.Query();</code>
注解
此类型是用于 Coclass(托管代码需要此 Coclass 来实现 COM 互操作性)的包装。 使用此类型来访问由此 Coclass 实现的 COM 接口。 有关 COM 接口的信息(包括指向其成员说明的链接),请参阅SharepointListAdapter2。
SharePointListAdapter 对象表示用于从 SharePoint 列表或文档库检索数据的 Office InfoPath 数据适配器。
对于辅助数据源, SharePointListAdapter 对象可通过 QueryAdapter 对象的 属性 DataSourceObject 进行访问。 数据适配器对象可通过 DataAdapters 对象的 属性 XDocument 进行访问。
属性
Name |
获取对象的名称 SharepointListAdapterObject 。 (继承自 SharepointListAdapter) |
QueryAllowed |
获取一个总是返回 true 的值,该值与表单定义文件 (.xsf) 中的 queryAllowed 属性相对应。 (继承自 SharepointListAdapter) |
SiteUrl |
获取对象将查询的Windows SharePoint Services网站的SharepointListAdapterObject统一资源定位符 (URL) 。 (继承自 SharepointListAdapter) |
SubmitAllowed |
设置一个值,该值与表单定义文件 (.xsf) 中的 submitAllowed 属性相对应。 (继承自 SharepointListAdapter) |
方法
Query() |
从关联的数据适配器中读取数据。 (继承自 SharepointListAdapter) |
Submit() |
可用于 SharepointListAdapterObject,但是,由于 SharePointListAdapter 对象仅可用于接收数据,因此该方法在该对象上调用该方法时将始终生成运行时错误。 (继承自 SharepointListAdapter) |