Latest Tutorials| Questions and Answers|Ask Questions?|Site Map



Home Answers Viewqa JSP-Servlet how to retrieve the id value itself from the access database to drop down listbox in jsp
Login         

View Questions and Answers by Category

Advertisements


 
Have Programming Question? Ask it here!
 
 
 


periasamy.s
how to retrieve the id value itself from the access database to drop down listbox in jsp
1 Answer(s)      3 years and 6 months ago
Posted in : JSP-Servlet


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


Advertisement
View Answers

March 30, 2011 at 11:44 AM


<%@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>


Related Tutorials/Questions & Answers:
how to retrieve the id value itself from the access database to drop down listbox in jsp
how to retrieve the id value itself from the access database to drop down listbox in jsp  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
retrive the data from access database to drop down list box in jsp
retrive the data from access database to drop down list box in jsp  hai, im new to jsp now im using the jsp along with access database.in table i load all the data's i need to retrive the data from database to dropdown list box
Advertisements
jsp code for a drop down box to retrive value from database
jsp code for a drop down box to retrive value from database  my project needs to get the value from database in to the drop down box..... pls give me code for that ..... tan q   1)login.jsp: <html> <script>
how to set a value of dynamic number of drop down lists on a jsp page and access it value on another jsp page
how to set a value of dynamic number of drop down lists on a jsp page and access it value on another jsp page  actually i have to create dynamic number of drop down lists(depending upon number of books in that category) on jsp
retrieve value from database on the basis of maximum id number
retrieve value from database on the basis of maximum id number  hi, i want to retrieve value of maximum id number from the database and show that value in jTextField.when the user clicks on the button that maximum id number
how to import values from database to the drop down box
how to import values from database to the drop down box   hi iam... employee page i kept a drop down box for employee Ids i want all employee IDs will display in the drop down box please help me with the code
Drop down list from database
Drop down list from database  Hi, Can I know how do we get the drop down list from database? Eg: select country--select state--select district--so... * from country"); while(rs.next()){ %> <option value="<
code for insert the value from jsp to access database
code for insert the value from jsp to access database  code for insert the value from jsp to access database
How to send the data selected from drop down menu from html page to sql 2005 database.
How to send the data selected from drop down menu from html page to sql 2005... by user from html drop down menu such as check-in date for hotel reservation system ,how can I save these data in database and how to retrieve later .Thanks
how to retrieve data from database using combobox value without using request.getParameter in jsp - JSP-Servlet
how to retrieve data from database using combobox value without using request.getParameter in jsp  Answer pl
how to make drop down list in JSF & fetch data Item from database
how to make drop down list in JSF & fetch data Item from database  how to make drop down list in JSF & fetch data Item from database
How to retrieve data from database by using combo box value in jsp? - JSP-Servlet
How to retrieve data from database by using combo box value in jsp?  ...; } function showEmp(emp_value) { if(document.getElementById("emp_id").value... =""; document.getElementById("emp_id").value =""; if (xmlHttp.readyState==4
how to delete the access database value in jsp
how to delete the access database value in jsp  i loaded my database data into the dropdown list box...now i want to delete the value..plz send the source code to delete the value in dropdown list box and also from database
how to delete the access database value in jsp
how to delete the access database value in jsp  i loaded my database data into the dropdown list box...now i want to delete the value..plz send the source code to delete the value in dropdown list box and also from database
view data from database using drop down list
view data from database using drop down list  hi i want to view the data from database by selecting a value in a drop down list. for an example drop down list have picture element.when click it select pictures from the database
to access value of drop down value in beans when dropdown is populated using ajax
to access value of drop down value in beans when dropdown is populated using ajax  i want to access value of dropdown box in beans .. and this drop down was filled using ajax. plz help
to update drop down list value when selected from website
to update drop down list value when selected from website  hi help me, i want to insert value into db when i select from a drop down list..._assoc($list)){ ?> <option value="<?php echo $row_list['Age_Id']; ?>
to update drop down list value when selected from website
to update drop down list value when selected from website  hi help me, i want to insert value into db when i select from a drop down list..._assoc($list)){ ?> <option value="<?php echo $row_list['Age_Id']; ?>
to update drop down list value when selected from website
to update drop down list value when selected from website  hi help me, i want to insert value into db when i select from a drop down list..._assoc($list)){ ?> <option value="<?php echo $row_list['Age_Id']; ?>
how to retrieve images from database to jsp?
how to retrieve images from database to jsp?  Hi sir,i want to stores images along with the name and price with database and retrieve it on jsp.and...(); String strQuery = "select image from data where id="+id; ResultSet rs
how to store multiple values from drop down in database where i am using java struts 1.3
how to store multiple values from drop down in database where i am using java struts 1.3  hii, i am coding a form where i need a keyskills attribute where i have to select multiple keyskills. but it is taking only one valuee.. i
how to retreive data dynamically from mysql to drop down list
how to retreive data dynamically from mysql to drop down list   sir... fron end using jsp , after storing the data successfully .i want to retrieve the data of a particular column in a table into drop down list dynamically
The code for retrieving data from database into Drop Down List.
The code for retrieving data from database into Drop Down List.  <... but its now working.I am new to jsp, so dont know how to populate the textbox... to MySQL"); PreparedStatement pre = con.prepareStatement("select * from
displaying section in the jsp based on the sected value in drop down - Java Beginners
displaying section in the jsp based on the sected value in drop down   Hi friend, i have one problem in my jsp. i.e i have to display section on the jsp based on the selected value in the drop down list using java script code
how to retrieve data from database
how to retrieve data from database  unable to retrieve data from database using mySQL by using jsp sessions and beans for editing
how to retrieve data from database ?????/
how to retrieve data from database ?????/  how to retrieve data from database
how to retrieve data from database ?????/
how to retrieve data from database ?????/  how to retrieve data from database
how to retrieve data from database ?????/
how to retrieve data from database ?????/  how to retrieve data from database
how to retrieve data from database ?????/
how to retrieve data from database ?????/  how to retrieve data from database
Drop down and radio button value on edit action
Drop down and radio button value on edit action  HI, I have a title field and a payment type field for title i have used drop down with values... i get the value from the database for title and radio button selected
How to Autogenerate of ID from database and show on JSP page?
How to Autogenerate of ID from database and show on JSP page?  ... tasks id as primay key, I am using JSP and struts for database connectivity,Now I can update my database but i want to autogenerate tasks id in numbers(ie
Advertisements
 

 

 

DMCA.com