Tuesday, February 23, 2010

An error occurred while validating. HRESULT = '80004005'

You get "An error occurred while validating. HRESULT = '80004005'" error while building Setup Project(S) in Visual Studio 2008 where as project (A) included in the setup build successfully.

This error occures if something is wrong with references of the project(A)

Follow steps below to troubleshoot.

  • If you have multiple project outputs in your solution, identify the project that is giving the problem. You can do that by removing one project at a time from the Setup Project(S) until error goes away.

  • Once project is identified, identify the reference that could be giving the problem.

    • Check if the project(A) is referencing to a project that has been removed from solution. - Remove such references if any.

    • Check if the Project(A) is referencing to a project that was moved to a diffenrent physical location after it was added as a reference. - Remove and add such references.


  • Rebuild setup project after fixing the reference accordingly to see if error goes away.

Monday, January 11, 2010

Control Panel in Windows 7 OS

Create a new folder in windows explorer and rename it to
GodMode.{ED7BA470-8E54-465E-825C-99712043E01C}.
This folder will then contain a lot of control panel functions.

Update: It is functional on Windows 7 64bit, 32bit and Windows Vista 32bit. Do not try it on Vista 64 bit as Windows Explorer may crash.

Vista x64 users, make a shortcut and set it to point to: explorer.exe shell:::{ED7BA470-8E54-465E-825C-99712043E01C}

Tuesday, December 15, 2009

Row_Number

In older SQL versions , to create row numbers we had to create a temprari tble with identity column

SELECT ROWID=IDENTITY(int,1,1) , OrderNo
INTO Order2 FROM Orders ORDER BY OrderDate


SQL 2005 and later support Row_Number that returns a squential number of a row in specifed order.

SELECT OrderNo, ROW_NUMBER() OVER(ORDER BY OrderDate DESC) AS 'RowNumber'
FROM Orders

Partition clause takes us one step further and numbers Rows in squential order for each patition.

SELECT OrderNo, State, ROW_NUMBER() OVER(Partition by State ORDER BY OrderDate DESC) AS 'RowNumber'
FROM Orders

1001, IL, 1
1005, IL, 2
1007, IL, 3
1002, IN, 1
1003, IN, 2

Sunday, November 8, 2009

Modify productName, manufacturer in VS 2008 deployment project

Productname and manufacturer for deployment project can be modified through properties from setup project but if you right click the setup project and select Properties it pops up Property Pages that have only Build configuration properties. and no option to change product name or manufacturer.

A workaround for this is after selecting the Setup Project to open Property Window from Main menu select View->"Property Window" and it shows different set of properties to edit that contain product name and manufacturer.

Monday, September 21, 2009

IP Subnet Calculator

Very useful tool while configuring a subnet.

http://www.subnet-calculator.com/subnet.php

Thursday, August 27, 2009

T-SQL to Rename a Column Name or Table Name

renaming any column :
sp_RENAME 'TableName.[OldColumnName]' , '[NewColumnName]', 'COLUMN'

renaming any object (table, stored procedure etc) :
sp_RENAME '[OldTableName]' , '[NewTableName]'