473,379 Members | 1,187 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,379 software developers and data experts.

SharePoint UpdateListItems does not actually update data

IM
I have the following code which does not update anything in SQL.
Other tasks, like getting list of sites and list of documents work just
fine, but update does not seem to trigger anything. I want to be able to
change the column Column1 for a document with the name testDocument.
No errors are returned. I do run it on the box where SharePoint is, so
credentials is not an issue as it works for other tasks. Thanks in advance.

Dim listService As New SPService.Lists()
listService.Credentials = System.Net.CredentialCache.DefaultCredentials

Dim listName As String = '576E6735-4660-450F-B12F-A11D9CB49F5E'

Dim xmlDoc As XmlDocument = New XmlDocument

Dim batchElement As XmlElement = xmlDoc.CreateElement("Batch")

batchElement.InnerXml = "<Method ID='1' Cmd='Update'><Field
Name='Name'>testFile</Field><Field Name='Column1'>Column1</Field></Method>"

listService.UpdateListItems(listName, batchElement)

--
IM
Nov 30 '05 #1
1 6004
IM
Correction, I want to be able to update testFile, not testDocument, so query
is correct

--
IM
"IM" <no************@SPAMyahoo.com> wrote in message
news:uD***************@TK2MSFTNGP15.phx.gbl...
I have the following code which does not update anything in SQL.
Other tasks, like getting list of sites and list of documents work just
fine, but update does not seem to trigger anything. I want to be able to
change the column Column1 for a document with the name testDocument.
No errors are returned. I do run it on the box where SharePoint is, so
credentials is not an issue as it works for other tasks. Thanks in
advance.

Dim listService As New SPService.Lists()
listService.Credentials = System.Net.CredentialCache.DefaultCredentials

Dim listName As String = '576E6735-4660-450F-B12F-A11D9CB49F5E'

Dim xmlDoc As XmlDocument = New XmlDocument

Dim batchElement As XmlElement = xmlDoc.CreateElement("Batch")

batchElement.InnerXml = "<Method ID='1' Cmd='Update'><Field
Name='Name'>testFile</Field><Field
Name='Column1'>Column1</Field></Method>"

listService.UpdateListItems(listName, batchElement)

--
IM

Nov 30 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Ken Wigle | last post by:
All, I am trying to add some .net applications I wrote to a virtual directory underneath the sharepoint services web site. I am having some problems and wondering if a) this is possible and/or...
2
by: Alex | last post by:
Hi everyone, We recently installed Windows Server 2003 and Sharepoint Portal Server, and after a few days of using it and scouring the web for ways to pull data from MS SQL within SPS, I'm...
7
by: aaron.kempf | last post by:
team so i have a nice little list in sharepoint.. about 15k items i've got the simplest little join statement in access; and im trying to UPDATE the sharepoint list via an access query. so...
0
by: Fahad | last post by:
Hi, I am trying to update a list on sharepoint server via calling its standard built in web service. When ever i call the UpdateListitems() method, I get the following exception: at...
15
by: (PeteCresswell) | last post by:
Got a sample of MS's "Advisor Guide To Microsoft Access" in the mail today - accompanied by a sample "Advisor Guide To Microsoft SharePoint". I skimmed both, but the SharePoint explanation is too...
1
by: getobject | last post by:
I am building an ASP.Net site and wish to use a SharePoint to hold the information. I am trying to add an entry to a list using Sharepoint webservices and keep getting a SOAP exception. I have know...
20
by: Neil | last post by:
What is Sharepoint, and should I care?
0
by: TekPeter | last post by:
Hello all I've been trying to create a function to update a folder using the UpdateListItems Method and I'm having a problem. My function as follows with minor changes to remove client info. ...
2
by: Arielle | last post by:
Foreword: Our Sharepoint site runs off both Forms Based and Windows Authentication. That being said some users have dual accounts for both methods of authentication...but not all users. Each...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.