Solved

Display rows from Oracle into a dropdown box

Posted on 2003-11-05
3
275 Views
Last Modified: 2010-04-01
I have Oracle as the database in the backend.
I have a select query which selects some rows from a table in that database.
How do I employ JSP to retrieve those rows and display them in a dropdown on the front-end screen?
Needs urgent help !!
0
Comment
Question by:medebayan
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 19

Accepted Solution

by:
Kuldeepchaturvedi earned 250 total points
ID: 9692656
//Get the connection to Oracle database here
<SELECT NAME="whatever" ><OPTION VALUE=""></OPTION>
<%
qry=Select col1,col2 from your table ";
ResultSet rs= statement.executeQuery(callqry);
while(rs.next())
{
%>
<OPTION VALUE="<%=rs.getString(1)%>"><%=rs.getString(2)%></OPTION>
<%}
rs.close();%>
</SELECT>

This should do it..
Here I am assuming that you know how to connect to Oracle thru JDBC.
Regards
0
 
LVL 3

Expert Comment

by:applekanna
ID: 9698703
Also look into this link

http://www.experts-exchange.com/Web/Web_Languages/JSP/Q_20775730.html

same as above .. but has more discussions.

PLEASE DO NOT ACCEPT THIS COMMENT AS ANSWER
0
 
LVL 14

Expert Comment

by:kennethxu
ID: 9708784
>> Needs urgent help !!
please close your questions including this one? don't leave URGENT without followup!
http://www.experts-exchange.com/Web/Web_Languages/JSP/viewMember.jsp?mid=1130926

PLEASE DO NOT ACCEPT THIS COMMENT AS ANSWER
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Outlook for dependable use in a very small business   This article is about using the Outlook application (part of Microsoft Office) in a very small business, or for homeowners where dependability and reliability are critical requirements. This …
Postmortem reporting allow us to examine mistakes in a way that focuses on the situational aspects of a failure’s mechanism and the decision-making process of individuals proximate to the failure. Read our guide on how to handle IT post-mortem repor…
Come and listen to Percona CEO Peter Zaitsev discuss what’s new in Percona open source software, including Percona Server for MySQL (https://www.percona.com/software/mysql-database/percona-server) and MongoDB (https://www.percona.com/software/mongo-…
Monitoring a network: why having a policy is the best policy? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the enormous benefits of having a policy-based approach when monitoring medium and large networks. Software utilized in this v…

734 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question