SqlConnection myConnection=new SqlCOnnection()
myConnection.ConnectionString =”Data Source=localhost;”+Initial Catalog=Pubs;Integrated Security=”SSPI”;
…
String connectionString=WebConfigurationManager.ConnectionStrings[“Pubs”].ConnectionString;
SqlCommand myCommand=new SqlCommand();
myCommand.Connection=myConnection;
myCommand.CommandText=”Selet * form authors”;
or
SqlCommand myCommand=new SqlCommand(“select *from authors”,myConnection);