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



Login         

View Questions and Answers by Category

Advertisements


 
Have Programming Question? Ask it here!
 
 
 


logeswaran
jsp coding please.
2 Answer(s)      2 years and 3 months ago
Posted in : JSP-Interview Questions


hi sir, my name is logeswaran. I have a problem in jsp, that i need to get value like a person name from database into drop down list. please show me how to do it? thank you.

By the way, I'm using access database and coding JSP.


Advertisement
View Answers

July 6, 2012 at 4:39 PM


Follow these steps:

1)Go to the start->Control Panel->Administrative Tools-> data sources.

2)Click Add button and select the driver Microsoft Access Driver(*.mdb).

3)After selecting the driver, click finish button.

4)Then give Data Source Name and click ok button.

5)Your DSN will get created.

6) Restart your server and run the following jsp code.

<%@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()){
    String str=rs.getString("name");
%>
    <option value="<%=str%>"><%=str%></option>
    <%
}
%>
</select>


July 6, 2012 at 5:05 PM


thank you so much



Related Tutorials/Questions & Answers:
jsp coding please.
jsp coding please.  hi sir, my name is logeswaran. I have a problem in jsp, that i need to get value like a person name from database into drop down... database and coding JSP.   Follow these steps: 1)Go to the start->
Please provide the coding for this problem
Please provide the coding for this problem  Please provide the coding for the following problem. Write a "hangman" game that randomly generates a word and prompts the user to guess one letter at a time. Each letter in the word
Advertisements
Please give me coding for this..
Please give me coding for this..  Write an application that inputs one number consisting of five digits from the user.separates the number ibto its individual digits and prints the digits separated from one another by three
Begineer in coding please help me
Begineer in coding please help me  I have Person class{ int pid; String Pname; //and have a Address filed of type Address not String!!! Address... address to a person object.. please help me
Please provide coding for following problem
Please provide coding for following problem  Please provide the coding for the following problem: You will write a java program that will read data from a file. The data in the file will be: John Doe 75 Joe Blow 65 Mary Smith 80
problem in writing coding. Please help me.
problem in writing coding. Please help me.  Hi sir, my name is Logeswaran. I have problem in writing JSP coding for my university assigments. Actually I'm doing a Voting System. I need to know how to write JSP coding
jsp coding
jsp coding  what is the simple jsp code for bus ticket reservation system
coding in jsp & servlet
coding in jsp & servlet  plz... provide me coding of "online examination system" in jsp & servlet
Coding errors for printing function, please help
Coding errors for printing function, please help  Hello, We, my.... Can someone please take a look and help me to fix this. Although...; Please visit the following link: http://www.roseindia.net/java/example/java
coding problem - JSP-Servlet
coding problem  dear sir will u plz tell me how can we delete a record from the database(MSaccess) when option in the combobox is selected(jsp)  If u want to delete the record from database, by seleting
coding problem - JSP-Servlet
coding problem  Dear sir i m very new to JSP .I am using two conbobox .if any option is selected in first combobox then only its data from the database should be displayed in other combobox, means how can we refresh
coding problem - JSP-Servlet
coding problem  dear sir i m very new to JSP sir i m getting problem in dynamically changing the option of combobox from database(ms acess) .and after that option being selected for that the record from the databse should
online shopping cart complete coding in pure jsp
online shopping cart complete coding in pure jsp  online shopping cart complete coding in pure jsp   Please visit the following link: JSP Online shopping cart
hi.. please give me a java coding for the following question
hi.. please give me a java coding for the following question  Write a program that displays the following table (note that 1 mile is 1.609 kilometers). Miles Kilometers
hi.. please give me a java coding for the following question
hi.. please give me a java coding for the following question  Write a program that prompts the user to enter the number of students and each studentā??s name and score, and finally displays the name of the students
java coding - JSP-Servlet
java coding  how to send mail in LAN without internet using java progamme  Hi Friend, Please visit the following link: http://www.roseindia.net/javamail/ Thanks
hi.. please give me a java coding for the following question
hi.. please give me a java coding for the following question  Write a program that reads in investment amount, annual interest rate, and number of years, and displays the future investment value using the following formula
hi.. please give me a java coding for the following question
hi.. please give me a java coding for the following question  Suppose that the tuition for a university is RM10,000 this year and increases 5% every year. Write a program that computes the tuition in ten years and the total cost
hi.. please give me a java coding for the following question
hi.. please give me a java coding for the following question  Write a function called ChangeToNext that take in an uppercase character parameter ch. The function returns the next uppercase character if ch is between 'A' and 'Y
coding
coding  I need the logout coding. can you please help me.   Please visit the following links: http://www.roseindia.net/quickguide/tomcat/Logout.shtml http://www.roseindia.net/jsp/loginstatus.shtml
hi.. please give me a java coding for the following question
hi.. please give me a java coding for the following question  Write a class that contains the following two methods: /* converts from inches to centimeters */ Public static double inchToCentimeter(double in) /* converts from
hi.. please give me a java coding for the following question
hi.. please give me a java coding for the following question  Body Mass Index(BMI) is a measure of health on weight. It can be calculated by taking your weight in kilograms and dividing by the square of your height in meters
please help - JSP-Servlet
please help   i am making a program by this i can find out... with others combox values. Here is JSP's files: display.jsp... To Year "> please help
Please Help - JSP-Servlet
Please Help  Respected Sir/Madam, I am R.Ragavendran.. Thanks for your response.. You told me that its difficult to handle the problem.. Ok,Let me try my hands on it.. The help i need is can u please tell me
please help in jsp - JSP-Servlet
please help in jsp  i have two Jsp's pages. on main.jsp have some... data. here some data of Jsp's. main.jsp... please help.  Hi Friend, Try
Please answer me - JSP-Servlet
Please answer me  Hello Guys, this is the third time I'm sending... servlet or jsp codes that I can use to insert and retrieve image from MSSQL 2000 NOT MySQL. Please assist me and for other questions I've asked before
coding
coding  how to write a code for searching a link in another jsp file?pl give the soln soon
what is the jsp coding to insert a data in database tables
what is the jsp coding to insert a data in database tables  Dear Sir, I Want to know the coding for insert the data from jsp to oracle database.. my... server in coding.. thank you!! Ragulan.M  Here is a jsp code
Direct jsp coding for gmail login page and to open mail
Direct jsp coding for gmail login page and to open mail  DEAR SIR, i'm urgently in need of jsp coding to create login page of gmail and to open mail
Please help me to create this coding for pizza order application using a handheld computer.....
Please help me to create this coding for pizza order application using a handheld computer.....  You work as a programmer for IT-Tech a small... in the kitchen which displays the orders to be cooked. anybody please help me
JSP:NEED RESPONSE ASAP PLEASE! - JSP-Servlet
JSP:NEED RESPONSE ASAP PLEASE!  Hi freind, If you could respond... and then sends this data in url to the next jsp page. The code works fine...://localhost:8080/examples/jsp/popup.jsp?name='+content1+'&&dd='+content2,'mywindow
Advertisements
 

 

 

DMCA.com