Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Visual Basic > VB.NET 1.0 > BOOK: Beginning VB.NET Databases
Password Reminder
Register
Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
BOOK: Beginning VB.NET Databases
This is the forum to discuss the Wrox book Beginning VB.NET Databases by Thearon Willis; ISBN: 9780764568008
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning VB.NET Databases 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
Reply
 
Thread Tools Display Modes
  #1 (permalink)  
Old March 20th, 2005, 04:24 PM
Friend of Wrox
Points: 9,611, Level: 42
Points: 9,611, Level: 42 Points: 9,611, Level: 42 Points: 9,611, Level: 42
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Mar 2004
Location: Washington, DC, USA.
Posts: 3,069
Thanks: 0
Thanked 10 Times in 10 Posts
Default Another problem... Chapter 5

I typed in the following code according to the example on Page 104:

Dim objDataReader As OleDbDataReader
...
If objDataREader.HasRows Then
...

   I get an error on .HasRows: "'HasRows' in not a member of 'System.Data.OleDb.OleDbDataReader'."

   This is the second example in the book I can't get to work using the code as printed in the book.

Please help. Is there Errata? What can I check to fix this?



mmcdonal
__________________
mmcdonal

Look it up at: http://wrox.books24x7.com
Reply With Quote
  #2 (permalink)  
Old March 20th, 2005, 06:00 PM
Thearon's Avatar
Wrox Author
 
Join Date: Dec 2003
Location: Fuquay Varina, NC, USA.
Posts: 396
Thanks: 0
Thanked 8 Times in 8 Posts
Default

Another reader had a similar problem and was using Visual Studio 2002 as I expect you are. All of the code in the book was written using Visual Studio 2003.

However, to resolve this problem, all you need to do is to remove the If statement that checks the HasRows property of the DataReader.

Thearon
Reply With Quote
  #3 (permalink)  
Old March 20th, 2005, 06:23 PM
Friend of Wrox
Points: 9,611, Level: 42
Points: 9,611, Level: 42 Points: 9,611, Level: 42 Points: 9,611, Level: 42
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Mar 2004
Location: Washington, DC, USA.
Posts: 3,069
Thanks: 0
Thanked 10 Times in 10 Posts
Default

I am indeed using Microsoft Development Environment 2002. I wil have to upgrade. I only have VB.Net installed. Can I upgrade just the VB, or do I need the entire studio?

Also, how would I remove the If statement? Just rem out all the lines between If...End If? Or remove the conditional part, and leave the While...End While? I believe it is the latter. I am assuming this is okay to do since we know that conditional for purposes of this example?

mmcdonal
Reply With Quote
  #4 (permalink)  
Old March 20th, 2005, 06:26 PM
Friend of Wrox
Points: 9,611, Level: 42
Points: 9,611, Level: 42 Points: 9,611, Level: 42 Points: 9,611, Level: 42
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Mar 2004
Location: Washington, DC, USA.
Posts: 3,069
Thanks: 0
Thanked 10 Times in 10 Posts
Default

I remmed out the If line and the End If closing line, and it worked as advertised.

I will follow your upgrade advice when posted.

Thanks again for the help.

mmcdonal
Reply With Quote
  #5 (permalink)  
Old March 20th, 2005, 06:37 PM
Thearon's Avatar
Wrox Author
 
Join Date: Dec 2003
Location: Fuquay Varina, NC, USA.
Posts: 396
Thanks: 0
Thanked 8 Times in 8 Posts
Default

mmcdonal,

There's no need to upgrade as I believe that is possibly the only feature in the code that is not in Visual Studio 2002. If everything else is working fine as is then continue on with the exercises.

Of course if you want to upgrade then consult the Microsoft web site for the appropriate options at http://msdn.microsoft.com/vstudio/.

Thearon
Reply With Quote
Reply


Thread Tools
Display Modes

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 Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Having a problem in chapter 2 Okie BOOK: Beginning Access 2003 VBA 1 August 9th, 2007 10:30 AM
Chapter 5 Problem gogeo BOOK: Beginning Access 2003 VBA 1 October 10th, 2005 10:34 AM
Problem in chapter 7 gpauta JSP Basics 1 June 1st, 2004 04:31 AM
problem in chapter 4 gpauta JSP Basics 3 May 11th, 2004 06:31 AM



All times are GMT -4. The time now is 09:40 PM.


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