您的位置:首页 > 其它

Moss2007 UpdateListItems方法报错 ErrorCode 0x81020014

2011-03-08 13:38 344 查看
我在使用UpdateListItems方法更新List或者新增List数据时报错。

下面是MSDN对UpdateListItems的介绍:

Lists.UpdateListItems Method

来源:http://msdn.microsoft.com/en-us/library/lists.lists.updatelistitems.aspx

更新List Item:

<Batch OnError="Continue" ListVersion="1"
ViewName="270C0508-A54F-4387-8AD0-49686D685EB2">
<Method ID="1" Cmd="Update">
<Field Name="ID">4<Field>
<Field Name="Field_Name">Value</Field>
</Method>
<Method ID="2" Cmd="Update">
<Field Name="ID" >6</Field>
<Field Name="Field_Name">Value</Field>
</Method>
</Batch>


新增List Item:

<Batch OnError="Continue" ListVersion="1"
ViewName="270C0508-A54F-4387-8AD0-49686D685EB2">
<Method ID="1" Cmd="New">
<Field Name='ID'>New</Field>
<Field Name="Title">Value</Field>
<Field Name="Date_Column">2007-3-25</Field>
<Field Name="Date_Time_Column">
2006-1-11T09:15:30Z</Field>
</Method>
</Batch>


我在新增的时候老报错:

<ErrorCode>0x81020014</ErrorCode>

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



后来找到一篇文章: http://www.cnblogs.com/awpatp/archive/2010/05/18/1738671.html
看了才明白原来是引用field的时候要用internal name

我把自定义List默认的Title属性更改了名称,但是internal name仍然是Title,所以一直不能新增成功。

大家可以看看上面的那篇文章,写的很详细,我在这里就不复制了。
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐