Next row in database

  • Thread starter Thread starter David Whitehouse
  • Start date Start date
D

David Whitehouse

I've used an SQL staement to pull a table from my database using the
DataReader. ie SELECT * FROM Table. However i cannot get off the first row
of the table. Is there a DataReader.Next() statement or something that can
force the datareader to jump to the next row?
-David
 
Hi,

yes, you use MyDataReader.Read() to do this. It returns false if there is no
next row. Also, .NET v1.1 has a nice new feature in MyDataReader.HasRows
that helps you to see if the result set has rows or not. .Next() is for
getting the next result set from the same reader in case there is one.

Best regards,

Marc Hoeppner
NeoGeo
 
Back
Top