读书人

运用CAML过滤出错请大家指正

发布时间: 2013-01-05 15:20:39 作者: rapoo

使用CAML过滤出错,请大家指正
Server Error in '/' Application.

One or more field types are not installed properly. Go to the list settings page to delete these fields.

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: Microsoft.SharePoint.Client.ServerException: One or more field types are not installed properly. Go to the list settings page to delete these fields.

Source Error:


Line 141:
Line 142: ctx.Load(ret);
Line 143: ctx.ExecuteQuery();
Line 144:
Line 145: GlobalFunctions.CacheHelper.Set(key, ret);

Source File: E:\Harbour Plaza\Developement\HPProject\HPBLL\SPHelper.cs Line: 143

Stack Trace:

[ServerException: One or more field types are not installed properly. Go to the list settings page to delete these fields.]
Microsoft.SharePoint.Client.ClientRequest.ProcessResponseStream(Stream responseStream) +2167
Microsoft.SharePoint.Client.ClientRequest.ProcessResponse() +1049
HP.BLL.SPHelper.GetWebListItems(String hotelName, String webListTitle) in E:\Harbour Plaza\Developement\HPProject\HPBLL\SPHelper.cs:143
ASP.mobile_master.__Render__control1(HtmlTextWriter __w, Control parameterContainer) in e:\Harbour Plaza\Developement\HPProject\HPMobile\Mobile.master:113
System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +131
System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +246
System.Web.UI.Page.Render(HtmlTextWriter writer) +40
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +5290

Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.272

--------------------------------------------------
--------------------------------------------------
贴出代码:
var caml = new CamlQuery();
caml.ViewXml =
@"<View>
<Query>
<Where>
<And>
<Eq>
<FieldRef Name='DeleteFlag'/>
<Value Type='Text'>False</Value>
</Eq>
<Neq>
<FieldRef Name='_ModerationStatus'/>
<Value Type='Text'>0</Value>
</Neq>
</And>
</Where>
<OrderBy>
<FieldRef Name='Order0'/>
</OrderBy>
</Query>
</View>";
[解决办法]
感觉你的ModerationStatus应该是int型,Flag应该是Bool型,具体的列表设置你再看看,是不是你设置的Text类型,这个对应SharePoint的“单行文本”。

读书人网 >行业软件

热点推荐