Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Search Forums
Password Reminder
Register
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
Welcome to the p2p.wrox.com Forums.

You are currently viewing the section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Showing results 1 to 3 of 3
Search took 0.01 seconds.
Search: Posts Made By: dparsons
Forum: ASP.NET 2.0 Basics October 8th, 2007, 03:34 PM
Replies: 17
Views: 2,958
Posted By dparsons
True but logic like this: bool hasRecords...

True but logic like this:


bool hasRecords = false;

while(dr.Read())
{
//do something if the IDataReader has data
hasRecords = true;
}
Forum: ASP.NET 2.0 Basics October 8th, 2007, 03:25 PM
Replies: 17
Views: 2,958
Posted By dparsons
Ahh silly me. Imar is quite right and his work...

Ahh silly me. Imar is quite right and his work around that he displays on his site will work. You could also make use of some logic and .Read() to determine if the IDataReader contains any data...
Forum: ASP.NET 2.0 Basics October 8th, 2007, 03:10 PM
Replies: 17
Views: 2,958
Posted By dparsons
Consider that your IDataReader instance is named...

Consider that your IDataReader instance is named dr, your code would be:

if(dr.HasRows)
{
//DataReader hasrows
}
else
{
//DataReader is empty
}
Showing results 1 to 3 of 3

 


All times are GMT -4. The time now is 12:19 PM.


Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.