Question: I have a question about using databases...

```
 string node = Session["node"].ToString();

 SqlConnection dataConnection = new SqlConnection();
 dataConnection.ConnectionString = ConfigurationManager.ConnectionStrings["SumooHAgentDBConnectionString"].ConnectionString;
 SqlCommand dataCommand = new SqlCommand();
 dataCommand.Connection = dataConnection;

 dataCommand.CommandText = ("Select * from xyz where @xyzID= xyzID AND PathType=0")
 dataCommand.Parameters.AddWithValue("@xyzID", node);

 dataConnection.Open();
 dataCommand.ExecuteNonQuery();
 dataConnection.Close();

```

Now there are 5 columns in the table with 5 rows which should return.

I then want to add these values in a table or arraylist so that i can use those values in my code later...

What is the best way to do so????
Thanks

Answer: 
You may want to use the [`ExecuteReader`](http://msdn.microsoft.com/en-us/library/9kcbe65k.aspx) method instead of `ExecuteNonQuery`.
You can make use of [Data Access Application Block](http://msdn.microsoft.com/en-us/library/dd203144.aspx) released by Microsoft Patterns & Practices if you don't want to do all the low level ADO.NET plumbing work.