I believe in JAVA we can set the data reader to point to the 1st row of it’s result set. I have a SQLDataReader that has over 20 columns and I need to pre-process some columns and calculate some values before I use the entire result set. Is it possible to re-read the data reader after reading it for the first time to get just selected columns? Or will I need to store the results in a data table and read from it later?
Share
From the MSDN docs at http://msdn.microsoft.com/en-us/library/system.data.sqlclient.sqldatareader.aspx
You can read one row at a time, but you cannot go back to a row once you’ve read the next row.
You can read columns in a row in any order, any number of times, and skip fields if you want.