Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Sharepoint Lists

Status
Not open for further replies.

LenaR

Programmer
Joined
Sep 25, 2003
Messages
2
Location
ZA
I am trying to insert a new item into a sharepoint list and keep getting the following error:
"Exception of type Microsoft.Sharepoint.SoapServer.SoapServerException was thrown".
This is the code that I'm using:

listService.Credentials = System.Net.CredentialCache.DefaultCredentials

Try
xmlNdList = listService.GetList("Client List")
Catch 'list hasn't been created yet
xmlNdList = listService.AddList("Client List", "Use this list to add client information", 100)
End Try

Dim strBatch As String
strBatch = &quot;<Method ID='1' Cmd='New'>&quot; + _
&quot;<Field Name='ID'>4</Field><Field Name='Field_Number'>999</Field></Method>&quot; + _
&quot;<Method ID='2' Cmd='Update'><Field Name='ID' >6</Field>&quot; + _
&quot;<Field Name='Field_DateTime'>2003-11-11T09:15:30Z</Field></Method>&quot;

Dim xmlDoc As New Xml.XmlDocument
Dim elBatch As Xml.XmlElement = xmlDoc.CreateElement(&quot;Batch&quot;)

elBatch.InnerXml = strBatch

Try
Dim ox As System.Xml.XmlNode = listService.UpdateListItems(&quot;Client List&quot;, elBatch)
Catch ex As Exception
End Try

The list 'Client List' is published on the Sharepoint, but I can not insert items into it. Can anyone please tell me what I am doing wrong.

Thank you
Lena
 
Did you resolve the issue?
I am getting the same error.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top