SharepointListAdapterObject 接口
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
表示一个到 SharePoint 列表或文档库的连接。
public interface class SharepointListAdapterObject : Microsoft::Office::Interop::InfoPath::SemiTrust::SharepointListAdapter
[System.Runtime.InteropServices.Guid("096cd69a-0786-11d1-95fa-0080c78ee3bb")]
public interface SharepointListAdapterObject : Microsoft.Office.Interop.InfoPath.SemiTrust.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.SemiTrust.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.SemiTrust.DataAdapters.Item(System.Object)"></xref> property of the <xref data-throw-if-not-resolved="true" uid="Microsoft.Office.Interop.InfoPath.SemiTrust.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.SemiTrust.DataObject.DOM"></xref> property of the data adapter object:</p>
<code>adapter.Query();</code>
注解
此类型是用于 Coclass(托管代码需要此 Coclass 来实现 COM 互操作性)的包装。 使用此类型来访问由此 Coclass 实现的 COM 接口。 有关 COM 接口的信息(包括指向其成员说明的链接),请参阅SharepointListAdapter。
通过使用 SharepointListAdapter 接口成员,将可与 InfoPath 2003 兼容。 若要在 Microsoft InfoPath 2010 中使用添加到SharepointListAdapter2对象模型的新成员,必须将对象返回的对象强制转换为 SharepointListAdapter2 类型。 有关详细信息,请参阅如何:使用与 InfoPath 2003 不兼容的对象模型成员。
SharePointListAdapter 对象表示用于从 SharePoint 列表或文档库检索数据的 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) |