SharePointListAdapterRWObject 接口
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
代表用于从 SharePoint 列表或文档库检索数据的数据连接。
public interface class SharePointListAdapterRWObject : Microsoft::Office::Interop::InfoPath::SemiTrust::SharePointListAdapterRW
[System.Runtime.InteropServices.Guid("096cd635-0786-11d1-95fa-0080c78ee3bb")]
public interface SharePointListAdapterRWObject : Microsoft.Office.Interop.InfoPath.SemiTrust.SharePointListAdapterRW
type SharePointListAdapterRWObject = interface
interface SharePointListAdapterRW
Public Interface SharePointListAdapterRWObject
Implements SharePointListAdapterRW
- 属性
- 实现
示例
<span class="label">SharePointListAdapterRWObject</span> SPList = ((<span class="label">SharePointListAdapterRWObject</span>)thisXDocument.DataAdapters["SharePoint list"]);
thisXDocument.UI.Alert(SPList.SiteUrl);
SPList.Query();
<p>In the following example, a reference to the <xref data-throw-if-not-resolved="true" uid="Microsoft.Office.Interop.InfoPath.SemiTrust.SharePointListAdapterRW"></xref> 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">SharePointListAdapterRW</span> adapter;
adapter = (<span class="label">SharePointListAdapterRW</span>) thisXDocument.DataAdapters["Announcements"];
<p>After the reference has been set, you can use the methods of the <xref data-throw-if-not-resolved="true" uid="Microsoft.Office.Interop.InfoPath.SemiTrust.SharePointListAdapterRW"></xref> object as shown in the following example, which calls the <xref data-throw-if-not-resolved="true" uid="Microsoft.Office.Interop.InfoPath.SemiTrust.SharePointListAdapterRW.Query"></xref> method to re-query 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 接口的信息(包括指向其成员说明的链接),请参阅SharePointListAdapterRW
注意:使用 类实现SharePointListAdapterRWObject的成员编写的代码与在 InfoPath 2003 或 InfoPath 2007 中创建的 SharePoint 列表或文档库的数据连接不兼容,与 InfoPath 2007 表单模板之一在 InfoPath 中创建的新表单模板中的数据连接不兼容,或者与使用“数据Connections Connections”对话框中的“转换为以前的版本”按钮转换的数据连接。 如果不需要保持与早期版本的 InfoPath 的兼容性,并且想要使用 类实现SharePointListAdapterRWObject的成员编写代码,则可以使用“数据Connections”对话框中的“转换为当前版本”按钮转换数据连接。
对象 SharePointListAdapterRW 表示用于从 SharePoint 列表或文档库检索的 Microsoft InfoPath 数据连接。
对于辅助数据源,SharePointListAdapterRW可以通过 对象的 属性DataSourceObject访问QueryAdapter对象。 数据适配器对象可通过 DataAdapters 对象的 属性 XDocument 进行访问。
属性
ContentTypeId |
获取或设置与 对象关联的 SharePoint 列表的 SharePointListAdapterRWObject 内容类型 ID。 (继承自 SharePointListAdapterRW) |
ListId |
获取或设置与 对象关联的 SharePoint 列表的列表 SharePointListAdapterRWObject ID。 (继承自 SharePointListAdapterRW) |
Name |
获取对象的名称 Microsoft.Office.Interop.InfoPath.SemiTrust.SharepointListAdapterRWObject 。 (继承自 SharePointListAdapterRW) |
QueryAllowed |
获取一个总是返回 true 的值,该值与表单定义文件 (.xsf) 中的 queryAllowed 属性的值相对应。 (继承自 SharePointListAdapterRW) |
SiteUrl |
获取对象表示 Microsoft.Office.Interop.InfoPath.SemiTrust.SharepointListAdapterRWObject 的数据连接将查询的 SharePoint Foundation 网站的统一资源定位符 (URL) 。 (继承自 SharePointListAdapterRW) |
SubmitAllowed |
获取一个用于指定是否允许执行提交操作的值,它与表单定义文件 (.xsf) 中的 submitAllowed 属性的值相对应。 (继承自 SharePointListAdapterRW) |
方法
Query() |
从关联的数据连接中读取数据。 (继承自 SharePointListAdapterRW) |
Submit() |
将数据提交到关联的数据连接。 (继承自 SharePointListAdapterRW) |