Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

VB.Net: Populating comboboxes from data source

Posted on 2013-01-08
5
Medium Priority
?
235 Views
Last Modified: 2013-04-16
I have a couple of instances where I have a comboboxes menu in VB.Net, and I've bound it to a Binding source, which, in turn, is bound to an ".xsd" file, which defines a SQL-Server-based dataset.

I have two adjacent comboboxes, both with virtually the same arrangement of data bindings, and one populates, the other does not.  From the dataset designer, both queries work perfectly, giving me the results I expect.  As an experiment, I unchecked the box on both comboboxes that says "Use Databound items" and then re-established the datasets on both.  As before, the first resumed working and other resumed providing me with an empty list.  

I thought it time to get some advice on this.  Dropdowns have been a headache for me for a while.  Thanks, ~Peter Ferber
0
Comment
Question by:PeterFrb
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
5 Comments
 
LVL 83

Expert Comment

by:CodeCruiser
ID: 38759442
Are both bound to same dataset and binding source or separate?
0
 
LVL 20

Expert Comment

by:ElrondCT
ID: 38767756
If you stop the application with the debugger, does the dataset for the empty combobox have data, or is it empty?
0
 
LVL 9

Expert Comment

by:sognoct
ID: 38768032
without your code is impossible to give some help, can you attach here the form source ?
0
 

Accepted Solution

by:
PeterFrb earned 0 total points
ID: 38772762
Thanks for your comments.  I was able to solve the problem myself, on my office computer.  I don't have that in front of me at the moment, but I can describe what I did to solve the problem.  When I get back to the office, I can post some code.

The problem had to do with using the combobox itself as a data source instead of the data file.  Also the form needs a "Fill" statement to feed the control from the data source.  Those pieces were in place for one control, but not the other.  When I got through this, my dropdowns worked perfectly.

~Peter
0
 

Author Closing Comment

by:PeterFrb
ID: 39083417
I ended up solving the problem myself.  Thanks for the help, though.
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Use this article to create a batch file to backup a Microsoft SQL Server database to a Windows folder.  The folder can be on the local hard drive or on a network share.  This batch file will query the SQL server to get the current date & time and wi…
This article explains how to reset the password of the sa account on a Microsoft SQL Server.  The steps in this article work in SQL 2005, 2008, 2008 R2, 2012, 2014 and 2016.
In this video, Percona Solutions Engineer Barrett Chambers discusses some of the basic syntax differences between MySQL and MongoDB. To learn more check out our webinar on MongoDB administration for MySQL DBA: https://www.percona.com/resources/we…
Are you ready to place your question in front of subject-matter experts for more timely responses? With the release of Priority Question, Premium Members, Team Accounts and Qualified Experts can now identify the emergent level of their issue, signal…

597 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question