Home > > Populating selectboxes in form by retrieving data from oracle table

Populating selectboxes in form by retrieving data from oracle table

hi guys...im a student .......i was thinking if someone could help me out.
i am woking on a project which is being built using JSP with EL.(jstl)
My problem is.......i have 2 interdependent select boxes in my form,which are CATEGORY and SUB CATEGORY. I could populate the first select box dynamically by extracting the values from the database table CATEGORYDATATABLE as foll:
<sql:query var="q1" sql="select distinct(type) from catgorydatatable"/>
<select name=selectbox1>
<c:forEach var="a" items="${q1.rows}">
but the problem poped up when i tried to populate the second select box which is the subcategory.
ie for example
**if i select category as STUDENT from the first select box the second one should get populated with a of all student names......
**on selecting category as Employee in first select box i should get to see all employee names in second select box and these names are to be extracted from the table.
i tried the following code but it isnt working:
<sql:query var=q2 sql="select subtype from categorydatatable where type=${param.selectbox1}"/>
<select name=selectbox2>
<c:forEach var=b items="${q2.rows}"/>
please do help me with this.....i'd be very thankful on recieving a sample code on this
thank u....
After installing the ODAC package, I can now see a list of new drivers., including:
1) Oracle in OraClient11g_home1This one is the one you installed when you installed the Oracle client.
2) Oracle in XEThis one was installed when you installed XE on the system.
Which one should I chose? I would have expected a Oracle Client in XE. Is there another ODAC package for the Express edition? I could not find any.I'd use the first one, though I don't use XE so have no experience with it. They're probably the same or very similar clients in this case.
When I get into the Oracle ODBC Driver Configuration, it asks me for:
TNS Service Name
However, the dropdown box appears empty. Could you provide me a pointer on how to continue with the TNS Service name?There is a bug with the 32 bit driver that makes the dropdown always empty. You can just type the name in.
Of course, that means you need to know the name. XE may have set that up for you already. Go to where you installed XE and look for a tnsnames.ora file, typically in the \network\admin folder. If your local database is set up there, you can copy that file to the same place in the other Oracle client's installation folder (\network\admin), and then type in the TNS name (that's the name before all the stuff in brackets).
If there isn't one already set up, you'll have to create it and for XE I honestly have no idea how to do that. My DBA does it for all our databases. :)
Read the other 4 answers
Hello All, I am new to JSP, i have a requirement, I need to retrieve data from oracle table, here table is passed at random. how to get the data displayed in JSP page. can any one help me in that thanks1) Learn SQL. 2) Learn Java. 3) Learn JDBC. 4) L
hi, i have uploaded a piece of xml format data in oracle and successfully uploaded but when trying to retrieve data it reterieve 0 records. Oracle version is given below: Oracle Database 11g Enterprise Edition Release - 64bit Production PL
Hi, I am working on a report where I have to retrieve data from 3 tables(marc,mara,makt).For this I have used 3 select statements for retriving data from 3 tables.There r some fields which r not present in marc table where as present in mara and makt
Can anyone help me by telling how to retrieve data from variant table which was created by user. I am able to see data of variant table only thru cu60 transaction but not se11. I s there any function module to do this?Hello Mohan, if u already have d
How to retrieve data from catsdb table and convert into xml using BAPI Points will be rewarded, Thank you, Regards, Jagrut BharatKumar ShuklaHi, This is not your requirment but u can try this : CREATE OR REPLACE DIRECTORY text_file AS 'D:\TEXT_FILE\'
hi can any one explain me how to retrieve data from cluster tables Regards sachinyou can write a select select * from KONV        into table it_konv where <condition> you cant join.. cluster tables..Read other 2 answers
Hi All, I have big trouble to retrieve data from nested tables.. From java code developer are passing struct data type to Oracle procedure.. So equal data type in oracle has been created as created as object CREATE OR REPLACE TYPE TXNDATA AS OBJECT  
Hi, experts. I want  retrieve data from 8 tables. On which table i have to write for all entries query. Thanks in advance.Hai   Reddy, Actually IF we Use Join's Actually The Performance Will Be Good For  4 tables. So It Is Better  To  Create Two Join
Hello! I am interested how to connect to edcauditentity table and retrieve data from this table. I have sql query but i don't have idea how to start. For now i can connect to LiveCycle and retrieve policy name. Thank in advance!Hello Mohan, if u alre
Hi, Dear friends, I want to retrieve all the data from oracle table and then save them to mysql table using JDBC ResultSet. The problem is that some oracle table is too big, if I retrieve all of them to memory at a once time using excuteQuery, the pr
Hi, I am using Integration Import Script to load data from oracle table to worktables in FDM. i am getting following error while running the script. Multiple-step OLE DB operation generated errors. Check each OLE DB status value, if available. No wor
hello sir, i am using application importing csv/excel data to oracle table which is developed by vikas and that i want but when i add csv file and upload. My cvs file will displayed but when i click on create table button then it gives error like ...
I am new to AQ and XML, We have a situation at our project, the last DBA left us without any previous notice and no one here know AQ and XML. So now it is my duty to learn and work on this project. We are getting Queue with XML information (i mean da
Hi, I am using oracle 11g Express Edition, I have a file of .csv forma, Which has a data of size 500MB which needs to be uploaded into oracle table. Please suggest which would be the best method to upload the data into table. Data is employee ticket
I had trouble to store XML data into Oracle Table with XDK (Oracle 8.1.7 ). The error is: C:\XDK_Java_9_2\xdk\demo\java\Test>java testInsert Dept.xml <Line 1, Column 1>: XML-0108: (Fatal Error) Start of root element expected. Exception in thread
Hi, I want to load 1.5 GB size XML data to Oracle table . My Oracle version is 10G My Sample XML Data <Dealer>   <Id>10004</Id> is primary column , for 10004 i have address , contact and sales details , sales details will be multiple, no
Hello gurus, Importing excel data into oracle tables.. I know this is the most common question on the thread ...First, i searched the forum, i found bunch of threads with loading data using sqlloader, converting excel into .Txt, tab delimited file, .
I need to insert data into oracle table from XML file If anybody handled this type of scenario, Please let me know how to insert data into oracle table from XML file Thanks in advanceThe XML DB forum provides the best support for XML topics related t
Hello, DB Version is How can i extract data from oracle table to flat file or excel spread sheet by using sub programs? Regards, DHere what I did SET NEWPAGE 0 SET SPACE 0 SET LINESIZE 80 SET PAGESIZE 0 SET ECHO OFF SET FEEDBACK OFF SET VE