DbDataReader.previous()

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi;

In .net 2.0 I need the ability to not only get the next row in a result set,
but also the previous. Is there a way to do this in .net? (Similiar to the
JDBC ResultSet.previous?)
 
DataReaders are forward only / read only. If you need such random access
between records, you either need to write your own server side cursor
implementation (not recommended), or go the DataTable/DataSet route.
 
Sorry, dave. My previous post was answering you another post. I mis-post it
to this issue.

For this issue. In .net 2.0 the DataRader cannot get the previous row.
Because it is readonly and forward-only. In this case you have to fill the
result set to a DataSet and you can do what you need within the Dataset.

Kevin Yu
=======
"This posting is provided "AS IS" with no warranties, and confers no
rights."
 
Back
Top