how can I extract all the values of one field from the database table (ex : all the names from the field NAME) and put them in a combo box in run time in the dynamically generated page… and secondly, if all the values are available in the combo box, how can I select one value at a time from the combo box and store that value in a variable during run time…
hai..
I just give you the code for displaying and storing the values in the run time(part of code).
<%
//query for selecting the values from the database
pstmt1=con.createStatement();
rs=pstmt1.executeQuery("select * from test.emp");
%>
Select the Employee Id from the Combo box
<%
while(rs.next())
{
%>
"><%=rs.getString("empid")%>
<%
}
%>
<%
id=request.getParameter("eid");
%>