SharePoint Blog - René Hézser

Anmelden  RSS Feed RSS Feed
Startet die Suche

Dec 282008

Cancel the activation of a SPFeature

If you have ever created a SPFeatureReceiver class, you might have noticed, that there is no “FeatureActivating”. So what do you do to cancel an activation of your feature?

Just throw an exception within FeatureActivated. This will cancel the activation process, and not activate the feature.

throw new SPException("The feature could not be activated.");
Technorati Tags: ,

Published: 12/28/2008  11:35 AM | 0  Comments | 0  Links to this post
Tagged as: Development, SharePoint, Solution

Dec 192008

CKS:EBE

In case you do not know the Enhanced Blog Edition, you have to check it out. The upcoming version has lots of improvements. One is the possibility to use the extension on a non English SharePoint blog site.

I am working on the translation to German, and some other stuff. When it is done, I will use the extension on my blog as well.

Tags:


Published: 12/19/2008  5:35 PM | 0  Comments | 0  Links to this post
Tagged as: CKS EBE, SharePoint

Dec 172008

SQL Server 2005 SP3

In case you missed it (like I did). The SP3 for SQL Server 2005 has been released. You can download it directly from Microsoft.

If you are running an Express version, you have to download an updated SQL Server 2005 Express from here.

Technorati Tags: ,,

Published: 12/17/2008  9:38 AM | 0  Comments | 0  Links to this post
Tagged as: SQL Server

Dec 112008

Deleting many ListItems / SPFiles

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:


Published: 12/11/2008  2:33 PM | 0  Comments | 0  Links to this post
Tagged as: SharePoint