P
Poppy
Can someone point me to an example of populating an array from either a
dataset or a datareader ?
This .net stuff is killing me.
dataset or a datareader ?
This .net stuff is killing me.
Ashish M Bhonkiya said:Hi,
Following code will help you to populate the data from the datareader in to
an arraylist.
ArrayList rowList = new ArrayList();
SqlDataReader reader = storedProcCommand.ExecuteReader();
while (reader.Read())
{
object[] values = new object[reader.FieldCount];
reader.GetValues(values);
rowList.Add(values);
}
10Cents
Regards
Ashish M Bhonkiya
Poppy said:Can someone point me to an example of populating an array from either a
dataset or a datareader ?
This .net stuff is killing me.
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.