SharePoint Blog - René Hézser

Anmelden  RSS Feed RSS Feed
Startet die Suche

Archive

Kategorien

Links

Andere Blogs




ITaCS GmbH


Deleting many ListItems / SPFiles  

Dec 112008

Deleting a large amount of items in SharePoint can take some time. There are several ways on how to delete items:

  1. Deleting items using the OM with list.Items.DeleteItemById(itemID);
  2. Deleting items using the SharePoint Webservices
  3. Deleting items using the OM with web.ProcessBatchData(caml);

list.Items.DeleteItemById(itemID);

You should not use the Items property of a SPList multiple time. Instead create a variable, which stores list.Items and use it instead.

Deleting items using the SharePoint Webservices

You will use a Webservice, if you need to delete elements on a remote SharePoint Server

Deleting items using the OM with web.ProcessBatchData(caml);

The same caml you would use for the Webservice, can be used with web.ProcessBatchData(). Deleting a large amount of items is significantly faster, than deleting items one by one.

A big “Thank you” goes to Keith Bunge, Vincent Rothwell and steveC for their articles:

 
Posted by René Hézser | 0  Comments | Trackback Url  | 0  Links to this post | Bookmark this post with:        
Tags: SharePoint
Technorati Tags:

Links to this post

Comments

Name *:
URL:
Email:
Kommentar:


CAPTCHA Image Validation