Solved

Display rows from Oracle into a dropdown box

Posted on 2003-11-05
3
269 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
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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
dateFashion java challenge 9 128
AlarmClock Challenge 35 145
How to Post an If Statement in JSP 3 45
maven project jars 7 46
A Short Story about the Best File Recovery Software – Acronis True Image 2017
Is your company's data protection keeping pace with virtualization? Here are 7 dynamic ways to adapt to rapid breakthroughs in technology.
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

757 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

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now