Sqlconnection in asp.net

Closed
MJAVED - 8 Mar 2011 à 00:48
 Atul Tiwari - 11 Mar 2011 à 01:25
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 response

Atul Tiwari
11 Mar 2011 à 01:25
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 ;