Friday, October 24, 2008

Sharing Points { }: Moving MOSS 2007 Content Database by STSADM Command-Line Tool

With MOSS being a good document management system, migrated databases of documents take up a lot of room and sometimes the databases need to unexpectadly be moved to a new server. This is a good article (which seems to work!)

Sharing Points { }: Moving MOSS 2007 Content Database by STSADM Command-Line Tool

Friday, September 26, 2008

Working with TreeView Control in C#

A good basic intro to Treeview functionality Working with TreeView Control in C#

Wednesday, September 24, 2008

Brian Wilson! : Event Handlers - Part 3: Register Event Handlers plus free Site Settings – Manage Event Handlers Add-on solution

I am looking for ways to register MOSS event handlers to content types. This article has a smart feature to manage events from the GUI, however I still havnt found a way to do it in code or via an elements.xml feature definition file......

Brian Wilson! : Event Handlers - Part 3: Register Event Handlers plus free Site Settings – Manage Event Handlers Add-on solution: "Managing EventReceivers using Site Settings application assemblies"

Monday, September 22, 2008

Increase your Virtual machine's disk size

I needed to increase my virtual machines C drive on a VMworkstation and this article seemed to do the trick !

Thursday, September 18, 2008

SQL 2008 Design Table change requires a DROP TABLE?!? - TechNet Forums

After spending last week at the UKs SQL bits Ive been trying to do everything database wise with SQL2008 - but SSMS wont let me simply update some data types on an existing table.

Here is the answer:

Re: SSMS 2008 Table change requires a DROP TABLE?!? - TechNet Forums: "Answer Re: SSMS 2008 Table change requires a DROP TABLE?!?

There is an option under Tools - Options - Designers - Table and Database Designers where this can be changed. An option that says roughly 'block saving changes that require recreating tables' (mine is in a different language, so this is a translation) must be checked by default in the Developer Edition.

Thursday, September 04, 2008

Adding an item of a specific contenttype to a list - Ton Stegeman [MVP] weblog

Adding an item of a specific contenttype to a list

 
 

This previous post shows how you can create content types in code. The code in this post will show you how you add an item to a list and set the contenttype for that item. An SPItem object has a property called ContentType, but you cannot use that, because it is readonly.

The code to do this looks like this:

 
 

            SPSite site = new
SPSite("http://myportal/testsite");

            SPWeb web = site.OpenWeb();

            SPList list = web.Lists["ContentTypeTest"];

 
 

            // We first check if the contenttype is available and then use the id.           

            SPContentType contentType = web.AvailableContentTypes["Proposal"];

            if (contentType != null)

            {

                SPListItem item2 = list.Items.Add();

                item2["ContentTypeId"] = contentType.Id;

                item2["Title"] = Custom contenttype, set from code!";

                item2.Update();

            }

 
 

Inserted from <http://www.sharepointblogs.com/tonstegeman/archive/2006/08/06/adding-an-item-of-a-specific-contenttype-to-a-list.aspx>