Solved

Display rows from Oracle into a dropdown box

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

Optimizing Cloud Backup for Low Bandwidth

With cloud storage prices going down a growing number of SMBs start to use it for backup storage. Unfortunately, business data volume rarely fits the average Internet speed. This article provides an overview of main Internet speed challenges and reveals backup best practices.

Question has a verified solution.

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

Color can increase conversions, create feelings of warmth or even incite people to get behind a cause. If you want your website to really impact site visitors, then it is vital to consider the impact color has on them.
There’s a good reason for why it’s called a homepage – it closely resembles that of a physical house and the only real difference is that it’s online. Your website’s homepage is where people come to visit you. It’s the family room of your website wh…
In a recent question (https://www.experts-exchange.com/questions/28997919/Pagination-in-Adobe-Acrobat.html) here at Experts Exchange, a member asked how to add page numbers to a PDF file using Adobe Acrobat XI Pro. This short video Micro Tutorial sh…
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…

770 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