DataSet ds; using (SqlConnection connection=new SqlConnection(connstring)) {
SqlCommand command = new SqlCommand(connstring); SqlDataAdapter adapter = new SqlDataAdapter(); connection.Open(); adapter.SelectCommand = command; ds = new DataSet(); adapter.Fill(ds);
SqlCommand command = new SqlCommand(connstring);
SqlDataAdapter adapter = new SqlDataAdapter();
connection.Open();
adapter.SelectCommand = command;
ds = new DataSet();
adapter.Fill(ds);
} return ds.Tables[0];
using (SqlCommand command = new SqlCommand(connstring)) { using (SqlDataAdapter adapter = new SqlDataAdapter()) { connection.Open(); adapter.SelectCommand = command; ds = new DataSet(); adapter.Fill(ds); } }
using (SqlCommand command = new SqlCommand(connstring))
{
using (SqlDataAdapter adapter = new SqlDataAdapter())
}