i have 5 names in a table and i need to put these in an arraylist....
any suggestions???
int rowsinmachgrp = getnumofrows();//gets no of rows in table
SqlConnection dataConnection = new SqlConnection();
dataConnection.ConnectionString = ConfigurationManager.ConnectionStrings["SumooHAgentDBConnectionString"].ConnectionString;
SqlCommand dataCommand =
new SqlCommand("select MachineGroupName from MachineGroups", dataConnection);
{ArrayList names = new ArrayList();
dataConnection.Open();
ArrayList names = dataCommand.ExecuteScalar();
Thanks