UpdateListItems / SharePointOnline / Error 0x81020026
Hello, i get the follwing Error when i try to Update Itms with UpdateListItems on an SharePoint Online. My i user a List in a subweb, so i use the subweb url for the Reference
<Results xmlns="http://schemas.microsoft.com/sharepoint/soap/"><Result ID="1,Update"><ErrorCode>0x81020026</ErrorCode><ErrorText>Es wird auf eine Liste verwiesen, welche nicht mehr vorhanden ist.</ErrorText></Result></Results>
The Code:
....
// Verbindung zur SharePoint Online Liste
SourceListRef.Lists SourceList = new SourceListRef.Lists();
System.Net.NetworkCredential SourceListCred = new System.Net.NetworkCredential();
SourceListCred.UserName = "XXX";
SourceListCred.Password = "XX";
SourceList.Credentials = SourceListCred;
String camlQuery = "<Where><Contains>" +
"<FieldRef Name='abgleich'/>" +
"<Value Type='Integer'>0</Value>" +
"</Contains></Where>";
//SharePoint Online Liste auslesen
XmlDocument xmlDocSourceList = new XmlDocument();
XmlElement query = xmlDocSourceList.CreateElement("Query");
query.InnerXml = camlQuery;
XmlNode queryResult = SourceList.GetListItems("EF56BA6D-E531-4117-A0B7-5D43792C1AA9", null, query, null, null, null, null);
XmlNodeReader r = new XmlNodeReader(queryResult);
Console.WriteLine(queryResult.OuterXml);
//Console.WriteLine(queryResultDest.OuterXml);
string strQuery;
XmlDocument xmlDoc = new System.Xml.XmlDocument();
System.Xml.XmlElement elBatch = xmlDoc.CreateElement("Batch");
elBatch.SetAttribute("OnError", "Continue");
elBatch.SetAttribute("ListVersion", "1");
while (r.ReadToFollowing("z:row"))
{
strQuery = "<Method ID='1' Cmd='Update'>" +
"<Field Name='ows_ID'>" + r["ows_ID"] + "</Field>" +
"<Field Name='ows_Titel'>BlUBB</Field>" +
"<Field Name='ows_abgleich'>1</Field></Method>";
elBatch.InnerXml = strQuery;
XmlNode ndReturn = SourceList.UpdateListItems("EF56BA6D-E531-4117-A0B7-5D43792C1AA9", elBatch);
Console.WriteLine(ndReturn.OuterXml.ToString()); // Return ausgabe
}
Console.WriteLine("Press any key to continue...");
Console.Read();
October 28th, 2010 3:02pm