Wrox Programmer Forums
| Search | Today's Posts | Mark Forums Read
BOOK: Beginning VB.NET 2nd Edition/Beginning VB.NET 2003
This is the forum to discuss the Wrox book Professional VB.NET 2003 by Bill Evjen, Billy Hollis, Rockford Lhotka, Tim McCarthy, Jonathan Pinnock, Rama Ramachandran, Bill Sheldon; ISBN: 9780764559921
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning VB.NET 2nd Edition/Beginning VB.NET 2003 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
  #1 (permalink)  
Old February 10th, 2006, 01:02 PM
Registered User
 
Join Date: Feb 2006
Location: Hudson, New Hampshire, USA.
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default Chap 16 example not working

Hello,

 I'm having trouble with the example on pp570, where you add records to the database. The line:

'Parameter for the au_id column...
objCommand.Parameters.Add ("@au_id", BindingContext(objDataView).Current("au_id"))

wont run. I've tried downloading the project from this site and its the same code and same problem:

Additional information: au_id is neither a DataColumn nor a DataRelation for table authors.

In addition, when I look at the Intellisense help, there's no overridden method that accepts a string so something is definitely wrong here.

I'm using WindowsXP, SP2, all patches with VB.NET 2003, which is what the book is all about.

Any help is appreciated.

  #2 (permalink)  
Old February 10th, 2006, 05:18 PM
Registered User
 
Join Date: Feb 2006
Location: Hudson, New Hampshire, USA.
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I'm digging deeper into the issue and found something strange.

 The current DataRowView for the DataSet has only four columns, which happen to be the four columns that are bound to controls. Me thinks there's some optimization going on here that the author may not have known about. It would *seem* that only those columns that are actually in use are maintained in the DataSet and DataView. Me thinks this is may be a bad thing but it would explain the error I'm getting.

  #3 (permalink)  
Old February 10th, 2006, 05:40 PM
Registered User
 
Join Date: Feb 2006
Location: Hudson, New Hampshire, USA.
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default

OK, never mind. I found a typo in my SQL statement where I left out the au_id field.

Terribly sorry.



Similar Threads
Thread Thread Starter Forum Replies Last Post
Chapter 16 Fig 16-11 krsouthern BOOK: Professional SharePoint 2007 Development ISBN: 978-0-470-11756-9 1 July 8th, 2008 12:11 PM
chap 16 Page 631 audreiev BOOK Beginning Linux Programming, 3rd Edition 0 July 7th, 2007 08:40 PM
Chap 16, P. 619: Dump the values into a database cJeffreywang BOOK: Professional VB 2005 ISBN: 0-7645-7536-8 0 July 1st, 2007 09:26 AM
Codes in LoanSlicer folder of Chap 16 are empty? cJeffreywang BOOK: Professional VB 2005 ISBN: 0-7645-7536-8 0 June 23rd, 2007 02:06 PM
problem with binding example (chap 16) cr1sty BOOK: Beginning VB.NET 2nd Edition/Beginning VB.NET 2003 8 September 12th, 2005 03:16 PM





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