This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach 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 Murach's Java Servlets and JSP this week in the Servlets 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?
 
I agree. Here's the link: http://aspose.com/file-tools
 
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