How do i update a list item in sharepoint using web service Update

V

vk

Hi,

I have this problem in updating a data record in sharepoint lists. I have
read the solutions posted in this forum but i still don't know how to do it.

For example in this solution:

Lists listService = new Lists();
listService.Credentials =
System.Net.CredentialCache.Def­aultCredentials;

XmlDocument doc = new XmlDocument();
System.Xml.XmlElement updates = doc.CreateElement("Batch");
try
{
updates.InnerXml = string.Format(@"<Method id='1'
Cmd='Update'>" +
"<Field Name='SPR No'>63626</Field>" +
"<Field Name='Severity'>Critical Failure</Field>"
+
"<Field Name='Status'>Closed</Field>"
+ "</Method>");

XmlNode node = listService.UpdateListItems
("139289E8-7DE2-4EBF-884D-BC57­B6AE0129", updates);

}

catch(Exception ex)
{
string strError = ex.Message;
}

The source code is to be put in Infopath form or in Microsoft .Net like
VB.Net or C#? What are the items being updated? Is this
"139289E8-7DE2-4EBF-884D-BC57­B6AE0129" listname or viewname? Which one is to
be used? If i don't want to take listname or viewname to identify the list,
what else can i use in order to identify the list?

Please reply to me asap.

Thanks!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top