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 January 16th, 2004, 11:10 AM
Registered User
 
Join Date: Nov 2003
Location: , , .
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
Default Beginning VB.Net Chapter 16

I read through Chapter 16 'Database Programming with SQL Server and ADO.NET' and I am stumped on just one part, hopefully you can help me out.

I have a form that connects to a SQL database, and I have a combo box on this form (this combo box has a list of facilities that a user would be able to choose one facility out of the combo box). I am filling the combo box with a SQL statement - works perfectly.

The rest of the data on the form, I am using a different SQL statement to populate my text boxes. I am also using this same SQL statement to retrieve the facility name for the combo box.

The combo box is serving double duty, as they usually do, it is giving me a list of all of the facilities in a drop down, and it is also returning the facility name of the record that I am retrieving from SQL.

Everything works perfectly, but. . .

When I navigate through my records, sometimes the combo box (facility name) does not change with what the facility name should be for that particular record, it's almost like it sticks on the same facility name sometimes. The facility ID (different text box) changes with every record but the combo box sometimes doesn't.

I did some troubleshooting. . .

If I put a text box in place of the combo box it works correctly, but this does not solve the problem of the user being able to select a facility, hence the need for a combo box.

Please help. I have been wasting too much time trying to figure this out.

Thanks.

  #2 (permalink)  
Old February 10th, 2004, 02:28 PM
Registered User
 
Join Date: Feb 2004
Location: , , .
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I've found that using a CurrencyManager object helps with this type of thing. It seems that your cbo is doing two functions... can we get a code sample from where you are changing the value of the combo box when loading the new record?



Similar Threads
Thread Thread Starter Forum Replies Last Post
Beginning VB.NET 2003 Chapter 16 siegmeister BOOK: Beginning VB.NET 2nd Edition/Beginning VB.NET 2003 7 October 8th, 2012 11:29 AM
Chapter 16 Beginning php5, apache, mysql, web dev charlie2450 Beginning PHP 1 September 13th, 2008 02:07 AM
Beginning VB.Net 2003 - Chapter 16 dougmcgee BOOK: Beginning VB.NET 2nd Edition/Beginning VB.NET 2003 7 July 15th, 2005 04:42 AM
Chapter 16 & 17: Configure MSDE/ASP.NET 1.1 danascmitz BOOK: Beginning VB.NET 2nd Edition/Beginning VB.NET 2003 1 May 11th, 2004 12:31 PM
Chapter 16 Pg 581 WroxAuthors.vb Flotschie BOOK: Beginning ASP.NET 1.0 1 August 18th, 2003 08:27 AM





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