i retrive data from sql database.
now,
i want to put that retrived data into array.
how could i do this?
i am use vb.net
plz anyone give any idea.
it's urgent
thanks in advance.U shud be able to do that using a foreach loop for going thru each DataRow in all the existing rows and then add the field values to an ArrayList. something like below..its a very rough outline but I guess it wud help u get a direction. I may be able to help u better if u can revert back with what exactly u are trying to do.
ArrayList ar = new ArrayList();
foreach (DataRow dr in yourtable.Rows)
{
ar.Add(dr.Columns["yourfield"]);
}
hth
No comments:
Post a Comment