Hi
I want to retrieve database data and concatenate them to a string. Here is my code
[code
string sql = "Select phone From users where userid=1 or userid=2 or userid=3 or userid=4
SqlDataReader dr = null
dr = SqlHelper.ExecuteReader(DBConnection.ConnString, CommandType.Text, sql)
ArrayList list = new ArrayList(0)
d
list.Add(dr["phone"].ToString()); //runtime error her
} while (dr.NextResult())
string[] array = (string[])list.ToArray(typeof(string));
string result = String.Join(", ", array)
[/code
I want to concatenate the phone number in DB to a string like
result = "123456,234567,345678,456789
How should I modify the code
Thanks