Wednesday, 27 May 2009

SiteMap and Master Page - User Interface

In order to do the User Interface like below from Visual Studio 2005 or 2008



First Create Web.SiteMap and SiteManager.Master Page.

Then follow the code in the screen shot.












Tuesday, 26 May 2009

Index in SQL SERVER

The SQL Server engine uses an index like a reader uses a book index. It helps to speed up the query output result.

Select * from T_Salary(nolock) where salary>4,000

Consider if the table T_Salary doesn't have any index. The query execution will query by scanning all the rows to find 3 persons having greater salary of 4,000.

Suppose if you create index like below:

Create index IDX_SAL on T_Salary (salary) with (Online=On)

[ Online = On - Works in Enterprise Edition]

Otherwise

Use Query Like Below:

Create index IDX_SAL on T_Salary (salary) with (Online=Off)
OR
Create index IDX_SAL on T_Salary (salary)

The above index will query the result without scanning the entire records or entire rows of the table.

This index also helps for Order by Clause, Group By Clause etc.

1. To see the indexes in Table:

EXEC sp_helpindex T_Salary

2. Index and Disk Space Required for Particular Table:

EXEC sp_spaceused T_Salary

3. To rename index:

EXEC sp_rename T_Salary.IDX_SAL, 'IDX_SALARY'

4. To Drop Index:

DROP INDEX T_Salary.IDX_SAL

Monday, 25 May 2009

IE Debug Disable Option



Go to IE - Tools Menu and Select Internet Options - Then Advanced Tab - Then Do like below. Check in the Disable Script Debugging options (Internet Explorer) and Disable Script Debugging options (Other) and then Apply - OK.