PC Review


Reply
Thread Tools Rate Thread

DbDataReader.Read() result

 
 
=?Utf-8?B?RGF2aWQgVGhpZWxlbg==?=
Guest
Posts: n/a
 
      5th Nov 2005
Hi;

The docs for this say "true if there are more rows; otherwise false." The
way that is written says that there is a row after the row it is now on.

But the way it appears to work is when it returns false, you are now past
the last row. Is this correct?

--
thanks - dave
 
Reply With Quote
 
 
 
 
Kevin Yu [MSFT]
Guest
Posts: n/a
 
      5th Nov 2005
Hi dave,

Yes, the Read method returns false when it has gone after the last row,
which mean EOF. Or true will be returned.

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

 
Reply With Quote
 
S.M. Altaf [MVP]
Guest
Posts: n/a
 
      5th Nov 2005
Which is why in all the DataReader examples you see, they say:

While dr.Read()

HTH
--------------------------------------------------------------------------------
All that glitters has a high refractive index.
www.mendhak.com


"Kevin Yu [MSFT]" <v-(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Hi dave,
>
> Yes, the Read method returns false when it has gone after the last row,
> which mean EOF. Or true will be returned.
>
> Kevin Yu
> =======
> "This posting is provided "AS IS" with no warranties, and confers no
> rights."
>



 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
dbDataReader Mr. X. Microsoft C# .NET 5 25th Sep 2010 01:34 AM
DbDataReader.HasRows - Whose Idea was that? Jehu Galeahsa Microsoft C# .NET 1 29th May 2010 01:57 AM
DbConnection, DbDataReader and DbCommand Jelle de Jong Microsoft C# .NET 2 11th Mar 2008 02:10 AM
DbDataReader numRows? =?Utf-8?B?RGF2aWQgVGhpZWxlbg==?= Microsoft ADO .NET 6 6th Nov 2005 12:02 PM
DbDataReader.previous() =?Utf-8?B?RGF2aWQgVGhpZWxlbg==?= Microsoft ADO .NET 3 4th Nov 2005 05:45 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 01:03 AM.