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


XmlNode nodeRsData = nodeListItems.ChildNodes[1];
foreach (XmlNode nodeRow in nodeRsData.ChildNodes) {
It then retrieves the ID fields, which are the hidden primary key for all list items with this line:
nodeRow.Attributes["ows_ID"].Value;
Finally, the method appends Method elements (which are individual CAML commands) that look like the following:
<Method ID="[Id]" Cmd="Delete">
<Field Name="Id">[Id]</Field>
</Method>
The Method CAML command's ID attribute provides an identifier (which incidentally does not need to be unique to
the batch) that SharePoint will return to you when you commit the batch, along with a notification of success or fail-
ure.
The Cmd attribute of the Method element identifies
this command as a Delete statement. The two other
valid values are Insert (which you'll see later) and
Update.
Finally the Field element in this context is like a WHERE
Id = '[Id]' command in SQL. You'll see the Field ele-
ment used in a different context shortly.
Streaming Data to CAML
After deleting all existing suppliers, you need to create
a data flow task that streams the updated data from
the Suppliers data table into a script component
that will append Insert CAML statements to the
batch. The numbered circles in Figure 8, Figure
9, Figure 10, and Figure 11 correspond to the
numbered steps in the following procedure:
1. Drag a Data Flow Task onto the Control Flow
design surface.
2. Connect the script task to the Data Flow Task.
3. Double click the Data Flow Task to get to the
data flow screen, where SSIS will manage the
stream-based flow of data from the Suppliers
table to the elementSuppliersBatch variable.
4. Add an OleDb Source.
5. Double click to get to the OleDb Source
Editor.
6. Select a Data Access Mode of "SQL
Command."
7. Enter the SQL to retrieve some data from the
Suppliers table: SELECT SupplierId,
25
Putting SharePoint to Work for You, an Internet.com Developer eBook. Copyright 2008, Jupitermedia Corp.
Putting SharePoint to Work for You
[
]
Figure 8: Data Flow Task: Create a new Data Flow
task and connect it to the Script Task.
Figure 9: Create an OleDb Source: The circled numbers
illustrate the process to get the Suppliers data from
an OleDb source.







Summary :

Streaming Data to CAML After deleting all existing suppliers, you need to create a data flow task that streams the updated data from the Suppliers data table into a script component that will append Insert CAML statements to the batch. Double click the Data Flow Task to get to the data flow screen, where SSIS will manage the stream-based flow of data from the Suppliers table to the elementSuppliersBatch variable.


Tags : flow,task,figure,suppliers,source,method,oledb,which,caml,sharepoint,batch,get,create





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