Posts

Showing posts from May, 2008

Windows Install/Uninstall Error :-Error 1327 : Invalid Drive Z

The error occurs while installation / uninstallation of Microsoft softwares like Office,SqlServer,VisualStudio in Windows OS. It may happen because of number of reasons. It may look for an entry in Windows registry which looks for an invalid drive, which may be created while installation of some other product. One solution is to check registry values for incorrect Data field. To resolve this behavior we can enter correct value data for register key. In Registry Editor locate Registry Key in following folders:- HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders If any Key has invalid Drive Entry, Right click on the Entry & change In

SQL Server 2005 - Showing ResultSet in a Single Row OR in a comma separated string format.

Scenario:- Suppose You have a table abc (Sal_Id int ,Emp_Id int). The Following Query is fired on the table select Emp_Id FROM abc WHERE Sal_Id=1 Query gives result with following rows 1 2 4 Your requirement is to get these values in a single row. This can be achieved by making use of COALESCE in SQL Server. The above Query can be modified as follows to fetch the rows in required format. DECLARE @EmpList varchar(100) SELECT @EmpList = COALESCE(@EmpList,'') + CAST(Emp_Id AS VARCHAR(3)) FROM abc WHERE Sal_Id=1 select @EmpList This will fetch result as 124 If you want result as a Comma Separated string, change COALESCE function as COALESCE(@EmpList,',' ''). You will get result as 1,2,4

Simple Program to read Xml File Using LINQ in ASP.NET 3.5

Image