Sqlconnection in asp.net

Closed
MJAVED - Mar 8, 2011 at 12:48 AM
 Atul Tiwari - Mar 11, 2011 at 01:25 AM
Good Morning Sir/Mam

How to connect to the sqlconnention with microsoft visual studio 2008 and sql server 2005.
please give ne the some important tips with example.


Thanks.

1 reply

first import using System.Data.SqlClient;

then
make
connection string
SqlConnection con=new SqlConnection("Data Source=NIRBHAY-PC;Initial Catalog=EILServicedb;Persist Security Info=True;User ID=sa;Password=nirbhay");

if using Sql Server Authentication ;
5