Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Register | FAQ | Members List | Calendar | 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 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
 
 
Thread Tools Display Modes
  #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.

 


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
Chapter 16 Fig 16-11 krsouthern BOOK: Professional SharePoint 2007 Development ISBN: 978-0-470-11756-9 1 July 8th, 2008 01:11 PM
chap 16 Page 631 audreiev BOOK Beginning Linux Programming, 3rd Edition 0 July 7th, 2007 09: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 10: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 03:06 PM
problem with binding example (chap 16) cr1sty BOOK: Beginning VB.NET 2nd Edition/Beginning VB.NET 2003 8 September 12th, 2005 04:16 PM



All times are GMT -4. The time now is 06:42 AM.


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