Mark - a few things:
The number of rows is irrellevant
Performance would be faster if you used a DataReader instead of a DataSet
A DataTable might serve you just as well if you must keep the Data around
for a return trip to the server (i.e. you're updating the data).
The following code snipped shows you how to get values out of a DataTable
(only slight change required to get equivalent out of DataSet).
Notice that we get to the values via the DataRow object - and more
specifically, it's Columns collection (implied in the code below):
if (DT.Rows.Count > 0) {
DataRow DR;
for (int p = 0; p < DT.Rows.Count; p++) {
DR = DT.Rows[p];
someIntValue = Convert.ToInt32(DR["PhotoAlbumID"]);
someStringValue = Convert.ToString(DR["Title"]);
}
}
Remember, you're just dealing with collections of collections: Specifically:
A DataSet is more or less a collection of DataTable objects
A DataTable is more or less a collection of DataRow objects
A DataRow object is more or less a collection of Column objects (these are
the guys that hold the actual data you are after.
"Mark Goldin" <ma********@comcast.net> wrote in message
news:um**************@tk2msftngp13.phx.gbl...
I pulling a dataset into my web form with one row of data.
How do I extarct the values from that dataset?
Thanks