Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我在打电话SPWeb.GetSiteData(anSpCrossListQuery)。
SPWeb.GetSiteData(anSpCrossListQuery)
<Where></Where>当我在 CAML 查询子句末尾使用意外空格调用它时,它无法返回任何结果或任何错误。
<Where></Where>
有人知道为什么吗?
因为 SharePoint 打算让开发变得痛苦 ;)
SharePoint 对 CAML 查询非常挑剔,并且会给出非常无用且有时难以理解的错误。显然在这种情况下,一个简单的 String.Trim() 将解决问题。
非常仔细地检查您的查询并确保其格式正确已经解决了我遇到的所有问题。