Hello all,
I wish to add a row in <TABLE> tags which
contains <TR> and <TD> and in the <SELECT... i want to fill the OPTION VALUE with the results of a Vector named vecType.
//CODE IN .JSP
<!-- here we call the select() method to add the value and work type categories. -->
<% out.print(insertList.connect()); %>
<% out.print(insertList.select()); %>
<% Vector vecType = insertList.getVecType(); %>
<% for (int i=0, j=1; i < vecType.size(); i++, j++)
{
%>
<%= out.println("<OPTION VALUE=j>" +"j. " + vecType.elementAt(i) + "</OPTION>"); %>
<BR>
<%
}
%>
The tricky part is that after connection, i call a select() method which includes the following code.
//THE BEAN IS CALLED insertList.
public String select()
{
try
{
Connection contact = DriverManager.getConnection("jdbc

racle:thin:scott/tiger@thename:PORT:thename");
Statement requete = contact.createStatement();
ResultSet resultat = requete.executeQuery("SELECT type FROM work_type");
while ( resultat.next() )
{
vecType.addElement(resultat.getString("type") );
}
}
catch
...
What i need to know is how to get it to insert in the actual <OPTION VALUE=... via the JSP and get what the vector contains???
Seems like i don't have the right way to do this.!!!
Please help and thanks for your time.
Good day!
MC (*_*)