Tag Archives: SharePoint Short

Get Default Database Infomation

SharePoint Short #15 Looking for a quick an easy way of retrieving the default content database information, like the SQL instance (i.e. servername\instance)? string sqlServerInstance = SPWebService.ContentService.DefaultDatabaseInstance.NormalizedDataSource;string sqlServerInstance = SPWebService.ContentService.DefaultDatabaseInstance.NormalizedDataSource; or individually string sqlInstance = SPWebService.ContentService.DefaultDatabaseInstance.Instance; string sqlServer = SPWebService.ContentService.DefaultDatabaseInstance.Server;string … Continue reading

Posted in SharePoint Shorts | Tagged | Leave a comment

Editing SPView objects

SharePoint Short #14 Making a change to a SPView object directly will not work: listObject.DefaultView.Title = "new title"; listObject.DefaultView.Update();listObject.DefaultView.Title = "new title"; listObject.DefaultView.Update(); What you should do is instantiate a new variable from the view you want to make changes … Continue reading

Posted in SharePoint Shorts | Tagged | Leave a comment

Handling Long Operations

SharePoint Short #13 Got some code that may take a while to complete? Good idea to let the user know they may have to wait a while, so put your code within the SPLongOperation block, as shown below, and it’s … Continue reading

Posted in SharePoint Shorts | Tagged | Leave a comment

Create a local term set

SharePoint Short #12 Instead of creating term sets that are available farm wide, it’s also possible to create a term set that is only local to a particular site collection. Create a site column as normal, selecting Managed Metadata type … Continue reading

Posted in SharePoint Shorts, Taxonomy | Tagged , | Leave a comment

SP 2013 – SQL Native Client

SharePoint Short #11 If you’re trying to install SharePoint 2013 and during the installation of the prerequisites it fails with the message “Error: The tool was unable to install Microsoft SQL Server 2008 R2 SP1 Native Client” and the error … Continue reading

Posted in SharePoint Shorts | Tagged , | 2 Comments