Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Display rows from Oracle into a dropdown box

Posted on 2003-11-05
3
Medium Priority
?
278 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 1000 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

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Files go missing when using DFS (Distributed File System) Replication and how to recover them and fix it.
When trying to connect from SSMS v17.x to a SQL Server Integration Services 2016 instance or previous version, you get the error “Connecting to the Integration Services service on the computer failed with the following error: 'The specified service …
In this brief tutorial Pawel from AdRem Software explains how you can quickly find out which services are running on your network, or what are the IP addresses of servers responsible for each service. Software used is freeware NetCrunch Tools (https…
How to fix incompatible JVM issue while installing Eclipse While installing Eclipse in windows, got one error like above and unable to proceed with the installation. This video describes how to successfully install Eclipse. How to solve incompa…

721 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