Wrox Programmer Forums
|
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 software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old March 20th, 2005, 05:24 PM
Friend of Wrox
 
Join Date: Mar 2004
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
 
Old March 20th, 2005, 07:00 PM
Thearon's Avatar
Wrox Author
 
Join Date: Dec 2003
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
 
Old March 20th, 2005, 07:23 PM
Friend of Wrox
 
Join Date: Mar 2004
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
 
Old March 20th, 2005, 07:26 PM
Friend of Wrox
 
Join Date: Mar 2004
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
 
Old March 20th, 2005, 07:37 PM
Thearon's Avatar
Wrox Author
 
Join Date: Dec 2003
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





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





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