Solved

Display rows from Oracle into a dropdown box

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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering 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

Read  the original post  on Monitis Blog. Hi.  My name is Erik Dietrich, and this is the first time I’ve posted on the Monitis blog.  By way of introduction, I thought it would make sense to talk about my initial experience with Monitis.   Befo…
This article was initially published on Monitis Blog, you can read it here . When it comes to deciding which approach to website performance monitoring is best for your business, unfortunately, like so many options in life . . . it depends. In t…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …
In an interesting question (https://www.experts-exchange.com/questions/29008360/) here at Experts Exchange, a member asked how to split a single image into multiple images. The primary usage for this is to place many photographs on a flatbed scanner…

730 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