File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
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
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??