Insert data from Excel to SQL Server 2005 by using copy and paste commands

28 06 2009

http://www.mssqltips.com/tip.asp?tip=1430





how to reset you sqlserver password

25 06 2009

hi anybody forget or lost sqlserver password, dont worry

follow these steps:-
1)open sql query analyzer
2)click on windows authentication
3)click connect
4)enter this command
sp_password null,’new password’,'username’

ex:-sp_password null,’hello’,’sa’

simple

now your password is reset now connect to sa user to this password

note:-if you are using vista open query analyzer ‘run as admin’





How do I send a web page

10 06 2009

System.Net.Mail does not natively support sending a web page. However, using the WebRequest class, you can screen scrape web pages, and pass the resulting Html string to the MailMessage object. The following example demonstrates this technique.

public static void EmailWebPage()
{
//create the mail message
MailMessage mail = new MailMessage();

//set the addresses
mail.From = new MailAddress(”me@mycompany.com”);
mail.To.Add(”you@yourcompany.com”);

//set the content
mail.Subject = “This is an email”;

//screen scrape the html
string html = ScreenScrapeHtml(”http://localhost/example.htm”);
mail.Body = html;
mail.IsBodyHtml = true;

//send the message
SmtpClient smtp = new SmtpClient(”127.0.0.1″);
smtp.Send(mail);

}
public static string ScreenScrapeHtml(string url)
{
WebRequest objRequest = System.Net.HttpWebRequest.Create(url);
StreamReader sr = new StreamReader(objRequest.GetResponse().GetResponseStream());
string result = sr.ReadToEnd();
sr.Close();
return result;
}





WCF

3 06 2009

I am very new to WCF this link is very useful who are learn to WCF

http://msdn.microsoft.com/en-us/netframework/cc512374.aspx





vs2010

20 05 2009

Microsoft released 2010 beta 1

http://blogs.msdn.com/jasonz/default.aspx





how to get distinct values particular column database

15 05 2009

hi

this is post is used people who want to get the distinct values of particulare column like this

sno sname qualification

1     kiran       mca

2  kick            mba

3   kiran        b.tech

now i want to only like this

1 kiran mca

2 kick mba

query is

select min(sno) as id,sname,max(qua) from kiran group by sname





C# Anonymous Types

14 05 2009

http://bellouti.wordpress.com/2008/01/20/c-30-anonymous-types/

We only use Anaonymouse types in local variables we are not use in function return types and function parameters





what is database mirroring???

8 05 2009




Code name for Microsoft Products

13 02 2009

http://en.wikipedia.org/wiki/List_of_Microsoft_codenames





code names for Visual Studio

13 02 2009

Visual Studio 2003 –>Quattro
Visual Studio 2005 –>Whidbey
Visual Studio 2008 –>Orcas
Visual Studio 2010 –>Rosario