Archive for the ‘Windows’ Category

While doing SharePoint development, we use a lot of pre- and post-build events in Visual Studio projects to do various things like build and deploy SharePoint solutions to our development environments, activate features automatically and other similar things to make the process of building solutions for SharePoint as automated as possible. One helpful way I’ve [...]

Tuesday, June 29th, 2010 at 12:59 | 0 comments
Categories: Visual Studio

I needed to check which views in a certain database contained a particular string today.  This is a pretty easy problem to solve.  Just use a query like this: SELECT    TABLE_NAME, VIEW_DEFINITION FROM       INFORMATION_SCHEMA.VIEWS WHERE    VIEW_DEFINITION LIKE ‘%<text_to_search_for>%’ This should find any views in the currently selected database that have the text you’re searching for in the [...]

Tuesday, May 18th, 2010 at 08:48 | 0 comments

I got an error code 158 today in a FeatureReceiver I had written while trying to delete a MasterPage in the FeatureDeactivated method.  I found this helpful blog post explaining the exact problem: http://blogs.msdn.com/ekraus/archive/2008/08/05/cannot-remove-file-error-code-158.aspx In short, the error code means the MasterPage is still in use on the site and so you can’t delete it.  [...]

Monday, March 22nd, 2010 at 12:18 | 0 comments
Categories: SharePoint

I was struggling to find the source of this error today while working on a SharePoint site.  We have a custom page that saves WCF configuration settings for a certain service.  It uses an SPPersistedObject to store the WCF configuration form information to populate the form when you visit it later. This method worked fine [...]

Friday, March 19th, 2010 at 10:24 | 0 comments
Categories: SharePoint

I learned something today while trying to add Top Navigation Bar navigation nodes in a SharePoint feature receiver. If you’re adding a node and also wanting to add child nodes of that node at the same time, make sure to actually add the parent node to the TopNavigationBar before trying to add the child nodes [...]

Tuesday, February 16th, 2010 at 13:32 | 0 comments
Categories: SharePoint

I was getting an error today while working on my company’s custom SharePoint theme on the webpart pages when in edit mode. In IE, you can move the webparts round between the different regions on the page by dragging the webpart headers around. To facilitate this, at some point along the line SharePoint calculates the [...]

Wednesday, November 18th, 2009 at 19:00 | 0 comments
Categories: Javascript, SharePoint

I’m not very familiar (which I am actually very happy for!) with VB.NET and so I had a hard time figuring out how to trim newline characters from a string in a Reporting Services report I was working on. Turns out none of the “regular” methods really work.  The Trim function only removes spaces and [...]

Tuesday, September 1st, 2009 at 19:16 | 1 comment
Categories: SQL Server 2008, VB.NET

I was looking for a way to find all the foreign keys to a primary key in a certain table in a certain database today at work.  A co-worker of mine found this link: http://sqlserver2000.databases.aspfaq.com/schema-how-do-i-find-all-the-foreign-keys-in-a-database.html It gives a script to use on the database that finds all the primary/foreign key relationships in the database.  You [...]

Thursday, July 2nd, 2009 at 10:38 | 0 comments
TOP