Home

This document is a cache from http://www.spidertg.com/cmsv5/images/stories/eBook_Libarary/Developer/Putting%20SharePoint%20to%20Work%20for%20You.pdf


Putting Share Point toWorkfor You

Document source : www.spidertg.com


Listing 2. Executing the Batch
Try
' retrieve the Suppliers batch
Dim elementSuppliersBatch As XmlElement = CType( _
Dts.Variables("elementSuppliersBatch").Value, XmlElement)
' get a list SharePoint service to send the batch updates to
Dim listService As SharePointServices.NorthwindSync.Lists = _
ListHelper.GetListsService()
' here's how to view the contents of your CAML statements
'Dts.Events.FireInformation( _
' 0, "!!!!!!!!!!!!!!!!", elementSuppliersBatch.InnerXml(), "", 0, False)
' executing a batch with no records in it will cause an error
If elementSuppliersBatch.ChildNodes.Count > 0 Then
' execute the results
Dim nodeResults As XmlNode = ListHelper.ExecuteLargeQuery( _
listService, "Suppliers", elementSuppliersBatch, 300)
' Here's how to view the results. In a production app you
' would want to write these out to a file.
' Dts.Events.FireInformation( _
' 0, "!!!!!!!!!!!!!!!!", nodeResults.InnerXml(), "", 0, False)
End If
Dts.TaskResult = Dts.Results.Success
Catch Ex As System.Web.Services.Protocols.SoapException
Dts.Events.FireError( _
1, Ex.TargetSite.ToString(), Ex.Detail.InnerText, "", 0)
Dts.TaskResult = Dts.Results.Failure
Catch Ex As Exception
Dts.Events.FireError( _
1, Ex.TargetSite.ToString(), Ex.Message, "", 0)
Dts.TaskResult = Dts.Results.Failure
End Try
38
Putting SharePoint to Work for You, an Internet.com Developer eBook. Copyright 2008, Jupitermedia Corp.
Putting SharePoint to Work for You
[
]







Summary :

Executing the Batch Try ' retrieve the Suppliers batch Dim elementSuppliersBatch As XmlElement = CType( _ Dts.Variables("elementSuppliersBatch").Value, XmlElement) ' get a list SharePoint service to send the batch updates to Dim listService As SharePointServices.NorthwindSync.Lists = _ ListHelper.GetListsService() ' here's how to view the contents of your CAML statements 'Dts.Events.FireInformation( _ ' 0, "!!!!!!!!!!!!!!!!", elementSuppliersBatch.InnerXml(), "", 0, False) ' executing a batch with no records in it will cause an error If elementSuppliersBatch.ChildNodes.Count >


Tags : quotquot,batch,dtstaskresult,sharepoint,dim,iew,dtseentsfireerror,dtsresultsfailure,end,xmlelement,heres,dtseentsfireinformation,extargetsitetostring





Terms    |    Link pdf-search-files.com    |    Site Map
   |    Content Removal Notice   
   |    Contact   

All books are the property of their respective owners.
Please respect the publisher and the author for their creations if their books copyrighted