【发布时间】:2015-11-12 06:22:32
【问题描述】:
我尝试使用 CAML 查询从文档库中检索文档,但此查询返回 null。请帮忙解决这个问题。
SPDocumentLibrary oDocumentLibrary = (SPDocumentLibrary)oWebsite.Lists["SampleDocument"];
SPQuery query = new SPQuery();
query.Query = string.Format("<Where><Eq><FieldRef Name='Author' /><Value Type='Text'>Name</Value></Eq></Where>");
SPListItemCollection collListItems = oDocumentLibrary.GetItems(query);
DataTable dt = collListItems.GetDataTable();
【问题讨论】:
-
我建议尝试SharePoint Stack Exchange 来解决特定于 SharePoint 的问题。可能是更集中的 SharePoint 开发人员。
标签: sharepoint-2013 web-parts caml sharepointdocumentlibrary