Wrox Programmer Forums
|
BOOK: Beginning Visual Basic 2005 Databases ISBN: 978-0-7645-8894-5
This is the forum to discuss the Wrox book Beginning Visual Basic 2005 Databases by Thearon Willis; ISBN: 9780764588945
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning Visual Basic 2005 Databases ISBN: 978-0-7645-8894-5 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 June 27th, 2007, 04:47 PM
Registered User
 
Join Date: Jun 2007
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default Chapter 9

Question about the "Try It Out" that starts on page 213 titled "Implementing Views and Stored Procedures in VB 2005"

The code I inputed doesn't seem to be working. The Projects & Groups pages work properly. I've transitioned the database/project to SQL Server as directed earlier in the chapter.

I think the problem occurs because by default there is no data in the GroupProjects Table in the database. When the code enters the "ActionAdd()" section after selecting a Group in the dropdown list and clicking the "add" button.....basically nothing happens.

Using Debugger, I've found that the code never enters the "For...Next" loop below and thus never adds the appropriate entry in the database.

For intIndex = 0 To objGroupProjectsDS.Tables( _
    "GroupProjects").Rows.Count - 1
.....
objData.Command.ExecuteNonQuery()
.....
Next

Is there an error in the code? Do I need to have some "sample" data in the database for the program to enter this For/Next loop?

Thanks for your help

 
Old June 28th, 2007, 04:31 AM
Thearon's Avatar
Wrox Author
 
Join Date: Dec 2003
Posts: 396
Thanks: 0
Thanked 8 Times in 8 Posts
Default

This exercise adds new group projects to the database. If you feel that you have made an error in entering the code, please review your steps and as a last resort you can download the sample code for this chapter and verify it against your code.

Thearon
 
Old June 28th, 2007, 09:42 AM
Registered User
 
Join Date: Jun 2007
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I found the problem....took about 6-7 checks of the code to finally catch it. I had the "DragDrop" event coded for "lblGroupProjects_DragDrop" and not "lstGroupProjects_DragDrop"....those two letters took me forever to find. Thank you debugger.

On a side note, I did download the sample code, however the version that you download from this website only has the final version of the code (and thus all the reworks from Chapter 10 on Business Logic that overwrite some of the code in Chapter 9).

Anyway, I found it and it works now. Thanks for your help.





Similar Threads
Thread Thread Starter Forum Replies Last Post
Chapter 2 - End of chapter exercises whizzkid1892 BOOK: Beginning PHP5, Apache, and MySQL Web Development ISBN: 978-0-7645-7966-0 1 July 30th, 2008 12:02 PM
chapter 7 - chapter 11 pelopito BOOK: Beginning CSS: Cascading Style Sheets for Web Design ISBN: 978-0-7645-7642-3 3 January 6th, 2008 11:40 AM
Generics chapter 12 difficult chapter i found ...? Larryz C# 2005 1 July 4th, 2007 09:40 PM





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