class returning multiple SQL 2000 rows
Posted on 2006-07-07
I have written a class that uses a sqlDataReader to read a row or rows from a table. The calling program passes a parameter indicating how many rows to return.
But, I don't know how to actually return more than one row to the calling program.
For example, I have the property 'loc' which will return location
so the calling program wants the value
of course that only returns one value for the topmost record
How can I get the class to return something for each row returned in the data reader? Would there be a way to return, for example,
myclass.loc(0) = value from first record
myclass.loc(1) = value from second record
myclass.loc(2) = value from third record