473,472 Members | 2,224 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

I have a combobox and a listbox. combobox data is populated from database table.When

1 New Member
I have a combobox and a listbox. combobox data is populated from database table.When the user select an item from the combobox, then the listbox will show a certain data from the same table. How do I do this? please help me.
Jan 14 '14 #1
1 1101
Luk3r
300 Contributor
The same way you got data into the combobox. When the combobox selectedindex is changed, you query the database for the information within the combobox, then get the value of the column that you want to be populated into the listbox and write it to the listbox. Example:

select * from Table where Column = 'combobox'

then

listbox.items.add(your reader.GetValue(column number)
Jan 14 '14 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

4
by: Ester | last post by:
I would like to read data from a database table row by row and execute some codes based on the data retrieved from each row. For example, there are 4 fields on a table called Image_Tbl. Those...
1
by: 4 | last post by:
I am having some trouble w/ a school project database that I am doing. The database is used for a ski rental shop. In the rental table I have various customers w/ rentals on different days. I have...
1
by: amy | last post by:
*** Sent via Developersdex http://www.developersdex.com ***
1
by: jyothi1105 | last post by:
Hi Guys, I need your help on retrieving data from DB. Iam working on WebAppl with VB.net and SQL 2000. I want to fill my form(textboxes) with details from the database table when the user...
19
by: obtrs | last post by:
I have some code for drop down its not working it gives the errors every thing looks fine to me help me out. Errors Notice: Undefined index: from in C:\wamp\www\site\booking.php on line 6 ...
0
by: bbaamm | last post by:
hai, i want to export the oracle database table data into excel.i have some data in database table.i want to save that data in excel sheet.how to do can any one plz suggest me.iam new to this. ...
1
by: sudha k | last post by:
how to bind data from database table to a dropdownlist nested in a gridview
1
by: Maryam M | last post by:
hi i want to store data in table in my database in sqlserver from microsoft visual studio, but i can not, because give error Incorrect syntax near 'valuse' and it point to co.ExecuteNonQuery(); ...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.