
how to retrieves the id which is an int datatype, from access database to drop down list box in jsp...plz send the code for that.....plz

<%@page import="java.sql.*"%>
<select>
<option value="--Select--">--Select--</option>
<%
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
Connection con = DriverManager.getConnection("jdbc:odbc:student");
Statement st=con.createStatement();
ResultSet rs=st.executeQuery("Select * from data");
while(rs.next()){
int id=rs.getInt("id");
%>
<option value="<%=id%>"><%=id%></option>
<%
}
%>
</select>
If you are facing any programming issue, such as compilation errors or not able to find the code you are looking for.
Ask your questions, our development team will try to give answers to your questions.