This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Servlets and the fly likes dynamic query to display dynamic results?? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "dynamic query to display dynamic results??" Watch "dynamic query to display dynamic results??" New topic
Author

dynamic query to display dynamic results??

rich werth
Ranch Hand

Joined: Sep 21, 2001
Posts: 57
this is my code to fill a drop down
<select name="loc">
<%
int i=0;
while (rs.next()) {
i++;
String location = rs.getString(1);
%>
<option value=<%= i %>><%= location %>
<% } %>
</select>
this is the default query i run on the page so it doesn't load blank
<%
String queryStr3 = "Select * from NON_IT where REQUESTOR_NAME = 'jane user'";
ResultSet eresults = dept.executeQuery(queryStr3);
%>
i would like to know how to build a dynamic query from what the user selects in the drop list and have that populate the same page with the new results when the user presses the submit button. can someone help me?
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: dynamic query to display dynamic results??
 
Similar Threads
Passing a Querystring from one page to the next
jsp and forms
dynamic help
JPA and static inner class, possible?
changing list values at run-time