displaying data from oracle database in drop down menu using jsp

Reply

Join Date: Apr 2008
Posts: 1
Reputation: dream_ankur is an unknown quantity at this point 
Solved Threads: 0
dream_ankur dream_ankur is offline Offline
Newbie Poster

displaying data from oracle database in drop down menu using jsp

 
0
  #1
Apr 2nd, 2008
Hi,
I am developing one website in which i have around 21 table in my database out of which 8 are master tables and rest are secondry tables. I want the data stored in some columns of master table to be displayed as drop down menu in my secondry table. few Column names are same in secondry table and master table. how do i do that???
Reply With Quote Quick reply to this message  
Join Date: Nov 2004
Posts: 6,145
Reputation: jwenting is just really nice jwenting is just really nice jwenting is just really nice jwenting is just really nice 
Solved Threads: 212
Team Colleague
jwenting's Avatar
jwenting jwenting is offline Offline
duckman

Re: displaying data from oracle database in drop down menu using jsp

 
0
  #2
Apr 3rd, 2008
by learning all about master-detail forms and queries, and learning why you should not use Java code from JSP.
As people are clearly allowed to attack me but I'm not allowed to defend myself, I no longer post to this site.
Reply With Quote Quick reply to this message  
Join Date: Apr 2008
Posts: 1
Reputation: groomy1on1 is an unknown quantity at this point 
Solved Threads: 0
groomy1on1 groomy1on1 is offline Offline
Newbie Poster

Re: displaying data from oracle database in drop down menu using jsp

 
0
  #3
Apr 7th, 2008
Originally Posted by dream_ankur View Post
Hi,
I am developing one website in which i have around 21 table in my database out of which 8 are master tables and rest are secondry tables. I want the data stored in some columns of master table to be displayed as drop down menu in my secondry table. few Column names are same in secondry table and master table. how do i do that???
Have you tried joining two tables with a sql statement? I hope this can help
http://www.adp-gmbh.ch/ora/sql/outer_join.html
Reply With Quote Quick reply to this message  
Join Date: May 2006
Posts: 60
Reputation: kaushik259106 is an unknown quantity at this point 
Solved Threads: 0
kaushik259106 kaushik259106 is offline Offline
Junior Poster in Training

Re: displaying data from oracle database in drop down menu using jsp

 
0
  #4
Apr 10th, 2008
I think he is asking how to display the column names in dropdown..
If thats the case use java code in your jsp(Though not the best practice).
Create a set with all the values and then parse it to display in the dropdown.. So as you told you dont want repeated data you can use something like this...

Set abcd = new Hashset();
abcd.add("kaushik"); / / these values you can fetch from db
abcd.add("1234");
abcd.add("kaushik");
so if my value repeats also i wont get repeated value in the result set.. and at the end the set will have only two values.. kaushik and 1234..
Hope that help..
Also remember if you are doing in jsp itself then generic type wont work and throw exceptions afterwards while accessing..
Last edited by kaushik259106; Apr 10th, 2008 at 3:00 am.
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Other Threads in the JSP Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC