469,917 Members | 1,460 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,917 developers. It's quick & easy.

Next row in database

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
Nov 17 '05 #1
1 3143
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

"David Whitehouse" <da***@whitehouse.liqx.net> wrote in message
news:3f******@dnews.tpgi.com.au...
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

Nov 17 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

2 posts views Thread by Arsalan Ahmad | last post: by
1 post views Thread by Waqarahmed | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.