我怎样才能提高性能使用SharePoint Web服务

问题描述:

有谁有如何提高UpdateListItems功能(在Lists.asmx)性能的任何recomendations插入列表项时我怎样才能提高性能使用SharePoint Web服务

林的发现,它需要大约1-2插入新项目的秒数是否正常?

继承人,其即时通讯的循环,它运行内运行的代码IM约1000倍

Dim xmlDoc As New System.Xml.XmlDocument() 
Dim query As System.Xml.XmlElement = xmlDoc.CreateElement("Batch") 

query.SetAttribute("OnError", "Return") 
query.SetAttribute("ListVersion", "1") 

query.InnerXml = "<Method ID='1' Cmd='New'>" & _ 
       "<Field Name='FieldName'>" & FieldData & "</Field>" & _ 
       "</Method>" 

Dim Result As XmlElement = L.UpdateListItems("List Name", query) 

提前感谢!

您可以在一次调用Web服务的过程中进行多次更新 - 即调用环路的以外的更新

所以你可以发送到UpdateListItems这样会更新2批记录。

<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> 
+0

不错的一个!...我正在努力寻求其他解决方案,事实上,我应该刚刚阅读文档!谢谢 – 2010-06-23 20:48:41