What object are you trying to use to read the data? You should use a DataReader for read only data operations. This uses a different set of methods for iterating thru the results.
Depending on what you want to do with the obtained data, you might be able to just directly databind the result set object (DataReader or other) to a control (like a data grid) that will handle the looping for you.
|