Friday, November 26, 2010

What is other use of Go statement in TSQL?

I will explain you this with an Example.


CREATE TABLE dbo.TEST (ID INT IDENTITY (1,1), ROWID uniqueidentifier)
GO
INSERT INTO dbo.TEST (ROWID) VALUES (NEWID()) 
GO 1000

Note Second Go 1000.  This will insert 1000 row to table test.

Tuesday, November 23, 2010

Show tooltip text in gridview row on mouseover.

This Code segment explains, How to show tooltip text in gridview row on mouseover from Code behind

C# Code
protected void GridView_RowDataBound(Object sender, GridViewRowEventArgs e)
{
if (e.Row.RowType e == DataControlRowType.DataRow)
{
//ShowToolTip
e.Row.ToolTip = "This text needs to shown on mouseover of the row!";
}
}

VB.NET
protected sub GridView_RowDataBound(ByVal sender As Object, e as GridViewRowEventArg)
if e.Row.RowType e = DataControlRowType.DataRow then
'ShowToolTip
e.Row.ToolTip = "This text needs to shown on mouseover of the row!";
End if
End Sub

How to Call print Dialog Box from JavaScript.

The Code segment show you, How to call print Dialog Box from JavaScript.

It is Very Simple, Just call window.print() function from java script
See Sample below…



<a href="JavaScript:window.print();">
<img src="set the image name" border="0"
width="17" height="17" align="middle" alt="Print Version" />
</a>

Thursday, October 21, 2010

Regular expressions in C#

Regular expressions are addictive. Playing with these compressed but powerful patterns is better than solving a Sudoku.

If you are wondering what this is all about because, obviously, regular expressions are just the use of “*?”, then read on because the truth is a lot more subtle and the result is a lot more powerful than you might suspect. Equally, regular expressions are something that you will find in more than just C#, they are useful in JavaScript, Perl, Java, Ruby and even in applications such as word processors.


Read more , Click here

Explain Linked Sever and How Add a Linked server?

Linked servers are a way to link to different OLEDB compatible data sources from within SQL Server. Here I am Explains the Concept with an example.

And Also How Add a Linked server?

Read it here

Wednesday, October 20, 2010

Find out Free disk space using SQL query

This code demonstrates use of master.sys.xp_fixeddrives. This returns all the drives available in the server and its free space in MB

Exec master.sys.xp_fixeddrives



RESULT

Drive MB Free
***** *******
C 10002
D 20002
F 57481


This will be very useful before large data load operation. We can check the disk space before starting the any large data load processes

Monday, October 18, 2010

do u know that windows XP is having a hidden "Star Wars Movie" inside it???

do u know that windows XP is having a hidden "Star Wars Movie" inside it???

You should be connected to the INTERNET for using this.

Go to Starts-->Programs-->Run
Type
telnet towel.blinkenlights.nl

And hit enter......... Enjoy the magic!!!!