1using (SqlConnection connection = new SqlConnection("connection string here"))
2{
3 using (SqlCommand command = new SqlCommand
4 ("SELECT Column1 FROM Table1; SELECT Column2 FROM Table2", connection))
5 {
6 connection.Open();
7 using (SqlDataReader reader = command.ExecuteReader())
8 {
9 while (reader.Read())
10 {
11 MessageBox.Show(reader.GetString(0), "Table1.Column1");
12 }
13
14 if(reader.NextResult())
15 {
16 while (reader.Read())
17 {
18 MessageBox.Show(reader.GetString(0), "Table2.Column2");
19 }
20 }
21 }
22 }
23}