Use the correct version of InstallUtil.exe

0 Comments

When you want to use "InstallUtil.exe" for installing a windows service, make sure that you use the correct version. You can only uninstall a .NET 2.0 windows service with the "InstallUtil.exe" in the folder "C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\InstallUtil.exe"

Drop all non clustered indexes in Microsoft SQL Server database

0 Comments

if exists (select * from [tempdb].[dbo].sysobjects where id = object_id(N‘[tempdb].[dbo].[##NonClusteredIndexesToDelete]’))         drop table ##NonClusteredIndexesToDelete create Table ##NonClusteredIndexesToDelete     ([Name] sysname, [TableName] sysname) insert ##NonClusteredIndexesToDelete select     sysindexes.[name],     sysobjects.[name] as TableName from     sysindexes (nolock)

Select all indices from a database in Microsoft SQL Server 2005

0 Comments

Select all indices from a database in Microsoft SQL Server 2005 select     [name] from     sysindexes (nolock) where ([name] not like ‘PK%’)     and ([name] not like ‘_WA%’)     and ([name] not like ‘sys%’)

C# – GridView – Custom Paging in ASP .NET 2.0 with Microsoft SQL Server 2005 using ROW_NUMBER() and VirtualItemCount

0 Comments

Add a datagrid to your aspx page. Set the following properties in the designer: AutoGenerateColumns="false"         AllowPaging="true"         AllowCustomPaging="true"         AllowSorting="false" <asp:DataGrid         ID="dg"         AutoGenerateColumns="false"         AllowPaging="true"         AllowCustomPaging="true"         AllowSorting="false"         DataKeyField="Id"