简体   繁体   English

SPList与SharePointclientObj.List

[英]SPList vs SharePointclientObj.List

What is the difference betweeen these? 这些之间有什么区别?

I am trying to programatically (on a NON sharepoint server computer) get sharepoint lists (I am an admin of these lists) and convert them into SQL Tables. 我试图以编程方式(在NON共享点服务器计算机上)获取共享点列表(我是这些列表的管理员),并将它们转换为SQL表。

So far I have been able to open the lists but not get the datatable. 到目前为止,我已经能够打开列表,但无法获取数据表。 I keep getting code snippets some using SharePointclientObj.List and others using SPList. 我不断获得一些代码片段,其中一些使用SharePointclientObj.List,另一些使用SPList。 The SPList isnt found with my assembly references? 我的程序集引用中找不到SPList?

using Microsoft.SharePoint;
using SharePointclientObj = Microsoft.SharePoint.Client;

and sadly enough the code that I am finding to do what I want is using the SPList. 而且,可悲的是,我找到的代码正在使用SPList执行。 Can I either get code to convert to a dataTable using the SharePointclientObj.List or an explination on how to get the SPList to connect properly? 我是否可以使用SharePointclientObj.List获得将代码转换为dataTable的代码,或者可以解释如何使SPList正确连接?

SPList object is part of Server Object Model which can be used only on computer where SharePoint resides. SPList对象是服务器对象模型的一部分,只能在SharePoint所在的计算机上使用。 To get data remotely you need to use one of SharePoint's remote APIs. 若要远程获取数据,您需要使用SharePoint的一种远程API。 Microsoft.SharePoint.Client which you mentioned is one of them called Client Object Model. 您提到的Microsoft.SharePoint.Client是其中之一,称为客户端对象模型。 You can find some examples here . 您可以在此处找到一些示例。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM