string name = ConfigurationManager.ConnectionStrings["sqlname"].ConnectionString;
SqlConnection conn = new SqlConnection(name);
conn.Open();
SqlCommand cmd = new SqlCommand();
cmd.Connection = conn;
//SqlCommand cmd = conn.CreateCommand();
SqlConnection conn = new SqlConnection(name);
conn.Open();
SqlCommand cmd = new SqlCommand();
cmd.Connection = conn;
//SqlCommand cmd = conn.CreateCommand();