This week's book giveaway is in the Agile and other Processes forum. We're giving away four copies of The Mikado Method and have Ola Ellnestam and Daniel Brolund on-line! See this thread for details.
Hard One > Default Value from a Combox Box, shown in a JList based on a prepared statement parameter
Declan Dee
Greenhorn
Joined: May 04, 2010
Posts: 20
posted
0
Hi Gents,
In desperate need of help
I need to do the following
I need to select from a range of values (via a regular resultset) and show this information in a Drop Down List - I succeded
Now I need to show in a JList ONLY values that are linked to what is currently selected in the combox, that are coming out of a MySQL database and I am already over 6 hours doing it
So basically when I select an option for example 'dance' or 'circus' in the drop down list. I need to get ONLY what is linked with 'Circus' in the MySQL database (via the code I have shown)
The MySQL code is fine. Currently the Prep statement is 'prepStatement.setString (1,"Dans");' This means that no matter what I select in the main drop down list, I will only get what is linked 'Dans' and not the other genres.
I tried with this but to no avail:
Here is the code, showing the two methods. The first method works fine when called. It makes a dropdown list with just Genres.
The second however...........
I would be very grateful if someone could help
Declan D
Declan Dee
Greenhorn
Joined: May 04, 2010
Posts: 20
posted
0
Just getting back. The code is actuall this:
This gives you the value of what is currently selected in the Combobox. That was the problem all along.
The rest
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to
run our stuff on 16 servers instead of 3.
subject: Hard One > Default Value from a Combox Box, shown in a JList based on a prepared statement parameter