Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
IDataReader HasRows Property
Message
 
To
24/05/2005 10:50:16
General information
Forum:
ASP.NET
Category:
The Mere Mortals .NET Framework
Miscellaneous
Thread ID:
01017076
Message ID:
01018338
Views:
22
Bill,

>I'm using IDataReaders in my business objects to bind to certain grids and I notice that the HasRows property is apart of the specific class (System.Data.OleDb.OlDbDataReader) but not the Interface (System.Data.IDataReader).
>
>I would have thought that the HasRows property would have been a good condidate for the Interface implementation, but no one else seems to be complaining so I assume that I'm in the dark about this subject.
>
>Is there an easy way to determine if the IDataReader has rows without casting the reader to the specific class (which would defeat the purpose of the Interface in the first place)?

That IS lame, isn't it? There's really no good way to figure this out generically without casting.

Regards,
Kevin McNeish
Eight-Time .NET MVP
VFP and iOS Author, Speaker & Trainer
Oak Leaf Enterprises, Inc.
Chief Architect, MM Framework
http://www.oakleafsd.com
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform