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



Home Answers Viewqa JSP-Servlet online quiz program coding using jsp, jdbc odbc connection with ms. access.. Thank you.

Have Programming Question? Ask it here!
 
 
 


nikila
online quiz program coding using jsp, jdbc odbc connection with ms. access.. Thank you.
1 Answer(s)      2 years and 5 months ago
Posted in : JSP-Servlet


please provide online quiz program coding using jsp, jdbc odbc connection with ms. access.. Thank you.


Advertisement
View Answers

April 3, 2012 at 3:03 PM


Create table test(ques,op1,op2,op3,op4,ans) and answers(id,ans). Then try the following code:

1)form.jsp:

<%@page import="java.sql.*"%>
<html>
<form method="post" action="result.jsp">
<table>
<%
Class.forName("com.mysql.jdbc.Driver").newInstance();
Connection connection = DriverManager.getConnection("jdbc:mysql://localhost:3306/register","root";, "root");
Statement st=connection.createStatement();
ResultSet rs=st.executeQuery("Select * from test");
int i=1;
while(rs.next()){
%>
<tr><td><%=i%></td><td><%=rs.getString("ques")%></td><td><input type="radio" value="<%=rs.getString("op1")%>" name="radio<%=i%>"/><%=rs.getString("op1")%></td><td><input type="radio" value="<%=rs.getString("op2")%>" name="radio<%=i%>"/><%=rs.getString("op2")%></td><td><input type="radio" value="<%=rs.getString("op3")%>" name="radio<%=i%>"/><%=rs.getString("op3")%></td><td><input type="radio" value="<%=rs.getString("op4")%>" name="radio<%=i%>"/><%=rs.getString("op4")%></td></tr>

<%
i++;
}
%>
<tr><td><input type="submit" value="submit"></td></tr>
</table>
</form>
</html>

2)result.jsp:

<%@page import="java.sql.*"%>

<%
String st[]=new String[10];
for(int i=0;i<st.length;i++){
int j=i+1;
st[i]=request.getParameter("radio"+j);
System.out.println(st[i]);

}
Class.forName("com.mysql.jdbc.Driver").newInstance();
Connection connection = DriverManager.getConnection("jdbc:mysql://localhost:3306/register","root";, "root");
Statement stmt=connection.createStatement();
ResultSet rs=stmt.executeQuery("Select ans from answers");
String ans="";
while(rs.next()){
ans+=rs.getString("ans")+" ";
}
int count=0;
String answers[]=ans.split(" ");
for(int i=0;i<answers.length;i++){
if(st[i].equals(answers[i])){
count++;
}
}
out.println("Your "+count+" answers are correct");
%>

For more information, visit the following link:

http://www.roseindia.net/jsp/online-quiz-application-jsp.shtml



Related Tutorials/Questions & Answers:
online quiz program coding using jsp, jdbc odbc connection with ms. access.. Thank you.
online quiz program coding using jsp, jdbc odbc connection with ms. access.. Thank you.  please provide online quiz program coding using jsp, jdbc odbc connection with ms. access.. Thank you.   Create table test
Online quiz mini project
Online quiz mini project  Sir i need a online quiz program coding using java servlet, jdbc odbc connection with ms. access. If possible send that source code to me. Thank you
Advertisements
Connection using Jdbc-odbc bridge Driver
Connection using JDBC-ODBC bridge driver JDBCExample.java... database is ready to connect using JDBC-ODBC bridge driver. For this you have...;} } Output Description of Program In the above program, Jdbc-Odbc
Connect to MS Acces wothout using ODBC but JDBC - JDBC
Connect to MS Acces wothout using ODBC but JDBC  Hi, I want to connect my MS Access using JDBC but not ODBC. Please help me out. Thanks
how to connect java with ms access using odbc in eclipse
how to connect java with ms access using odbc in eclipse  import..."); //Connection con = DriverManager.getConnection("jdbc:odbc:DRIVER={Microsoft Access Driver (*.accdb)};DBQ=student.accdb","",""); Connection con
jdbc odbc connection
jdbc odbc connection  i need a program in java which uses a jdbc odbc connection   Hi, You can create odbc datasource on your windows computer and then access in your Java program. Read the JDBC ODBC example. Thanks
JDBC-Odbc Connection
in explaining JDBC Odbc Connection in Java. The code explains you a how creation... JDBC-ODBC Connection       JDBC-ODBC Connection is a JDBC driver that translates the operation
JDBC ODBC Connection In Java
JDBC ODBC Connection In Java In this section we will read about the various aspects of JDBC ODBC such as, JDBC-ODBC bridge, JDBC ODBC connection, how... is sun.jdbc.odbc.JdbcOdbcDriver. JDBC ODBC Connection To Connect the JDBC and ODBC
problem in jsp using ms-access
problem in jsp using ms-access  after starting server(tomcat) wen v...("jdbc:odbc:st") Can u pls help us in solving this pbm by giving whole source... = DriverManager.getConnection("jdbc:odbc:student"); Statement st=con.createStatement
MS Access - JDBC
MS Access  hello Mr.Kaleeswaran, thank you very much for giving information about MS access database...but still i am having doubt in that topic...("sun.jdbc.odbc.JdbcOdbcDriver"); Connection con = DriverManager.getConnection("jdbc:odbc:db1
Need Help in creating online quiz application using JSP - JSP-Servlet
Need Help in creating online quiz application using JSP  Hi, i am creating online Quiz application using JSP and MySQl ,Apache 6 in Netbeans IDE. i..., JSP Page Online Quize Application
MS Access - JSP-Servlet
problem is how to connect MS Acces database with servlets ... thank you..."); Connection con = DriverManager.getConnection("jdbc:odbc:db1... stepts 1.to configure the ms access database to your system control panel
java &ms access - JDBC
for a food festival using Java swing as front end and MS access as Backend... ve managed to populate the JComboBox using MS Access. The problem is only 8 per... = DriverManager.getConnection("jdbc:odbc:access"); Statement st
Online Quiz Application in JSP
are going to implement of Online quiz application using of JSP. Step 1: Create... quiz question and answer form using with JSP or JDBC database.  Here... Online Quiz Application in JSP  
Jdbc MS-Access question
Jdbc MS-Access question  How to delete records from the three table in MS-Access? They are in relationship with each other regarding to data field
Jdbc MS-Access question
Jdbc MS-Access question  How to delete records from the three table in MS-Access? They are in relationship with each other regarding to data field
MS Access` - JDBC
MS Access`  Hello Sir, Thank you very much for your valuable... to insert image into MS Access Database. Now the task is how to retrieve the image.... So please help me in this regard sir.. thank you sir
jdbc warning regarding to ms access
jdbc warning regarding to ms access  shows warning msg while compiling using ms access : warning: sun.jdbc.odbc.JdbcOdbcDriver is Sun proprietary API...=DriverManager.getConnection("jdbc:odbc:accdsn","",""); try{ Statement stmt
MS ACCESS - JDBC
MS ACCESS  java.sql.SQLException: [Microsoft][ODBC Microsoft Access Driver] Syntax error (missing operator) in query expression 'origin='src' destination='dest''. THAT MY PROBLEM
audio files in jdbc connectivity with ms-access - JDBC
to retrieve audio files through jdbc connectivity with ms-access and how to play... static void main(String[] args) { try{ String url="jdbc:odbc:access"; File... = DriverManager.getConnection("jdbc:odbc:access"); PreparedStatement ps
Updating Ms Access Database using jsp - JSP-Servlet
Updating Ms Access Database using jsp  Hi I am new to jsp and I am trying to update a record in an access database. I only want to update part... in the fields. Can you tell me what I am doing wrong.  Hi Friend, Create
Thank you so much - JSP-Servlet
Thank you so much  Respected Sir/madam, By the grace of Sri guru Raghavendra, I have successfully got the output for my Image selection problem.. Lord Raghavendra has sent your team to help me in time.. Thanks
how to send emails to many using jsp by connecting to ms access dabase.
how to send emails to many using jsp by connecting to ms access dabase.  Hi. I am trying to send multiple emails and the email ids are stored in a table in a msaccess database.I am using jsp for this.And finally there should
online quiz
online quiz  Define a Question class which stores a multiple choice...) level. Use the Question class to define a Quiz class. A quiz can be composed of up to 10 questions. Define the add method of the Quiz class to add a question
MS-Access
MS-Access  I am trying to upload a image to ms-acess using jsp,and my...: [Microsoft][ODBC Microsoft Access Driver]COUNT field incorrect ".I think i set... = DriverManager.getConnection("jdbc:odbc:student"); File imgfile = new File("C:/rose.jpg
code for jsp to db connection using jdbc
code for jsp to db connection using jdbc  please send me the code...("sun.jdbc.odbc.JdbcOdbcDriver"); Connection con = DriverManager.getConnection("jdbc:odbc...;form method="post" action="http://localhost:8080/examples/jsp/insert.jsp"> <
ODBC connection
ODBC connection   import java.sql.*; import java.util.*; public... ODBC program,bt here I am getting error i.e Exception in Thread "main...)c.newInstance(); String s="jdbc:oracle:thin:@localhost:1521:ORCL
ODBC connection
ODBC connection   import java.sql.*; import java.util.*; public... ODBC program,bt here I am getting error i.e Exception in Thread "main...)c.newInstance(); String s="jdbc:oracle:thin:@localhost:1521:ORCL
ODBC connection
ODBC connection   import java.sql.*; import java.util.*; public... ODBC program,bt here I am getting error i.e Exception in Thread "main...)c.newInstance(); String s="jdbc:oracle:thin:@localhost:1521:ORCL
online quiz
online quiz  Define a Question class which stores a multiple choice...) level. Use the Question class to define a Quiz class. A quiz can be composed of up to 10 questions. Define the add method of the Quiz class to add a question
online quiz
online quiz  Define a Question class which stores a multiple choice...) level. Use the Question class to define a Quiz class. A quiz can be composed of up to 10 questions. Define the add method of the Quiz class to add a question
online quiz
online quiz  Define a Question class which stores a multiple choice...) level. Use the Question class to define a Quiz class. A quiz can be composed of up to 10 questions. Define the add method of the Quiz class to add a question
online quiz
online quiz  Define a Question class which stores a multiple choice...) level. Use the Question class to define a Quiz class. A quiz can be composed of up to 10 questions. Define the add method of the Quiz class to add a question
online quiz
online quiz  Define a Question class which stores a multiple choice...) level. Use the Question class to define a Quiz class. A quiz can be composed of up to 10 questions. Define the add method of the Quiz class to add a question
how to insert values from jsp into ms access
how to insert values from jsp into ms access   how to insert values using jsp into ms access database
how to store image file and videofile in ms access database using java? - JDBC
how to store image file and videofile in ms access database using java?  how to store image file and video file in ms access database using java
jdbc odbc
jdbc odbc  i want to fetch the data from the ms access and print on ms word for printing purpose?? the whole program is in swing to ms acess connectivity.. the whole set up is perform only printing part is remaining? so help me
jdbc odbc
jdbc odbc  i want to fetch the data from the ms access and print on ms word for printing purpose?? the whole program is in swing to ms acess connectivity.. the whole set up is perform only printing part is remaining? so help me
jdbc odbc
jdbc odbc  Sir, i want to get the selected value from JCombobox to ms... simply i just want to print in ms access or stored on ms acess databse in selected... = DriverManager.getConnection("jdbc:odbc:swing"); String sql = "INSERT
HTML(Registration form) to Jsp to stored into MS ACCESS database
HTML(Registration form) to Jsp to stored into MS ACCESS database  i am sending one html file that contain 18 fields these are stored in ms-access database by using jsp code.i want to urgent jsp code. please urgent sir. thank
Failed to run Online Quiz Application in JSP - JSP-Interview Questions
Failed to run Online Quiz Application in JSP   Hi, I have been following your following link to run the online quiz application, but I failed... your question. Thanks  Hi, I cannot run your online quiz
Online quiz mini project
Online quiz mini project  Hi. I follow one of the code for "Online quiz mini project". I would like to know how to count the number of wrong answers in jsp
accessing ms access through jsp
accessing ms access through jsp  i have 3 tables in my database employee,project,task if i put employee id the search field .i should get details from other table what all queries should i use in servlet file and i am using
how to connect to MS access database in JSP?
how to connect to MS access database in JSP?  how to connect to MS access database in JSP? Any seetings/drivers need to be set or installed before... = DriverManager.getConnection("jdbc:odbc:student"); Statement st=con.createStatement
J2ME connectivity to ms access
J2ME connectivity to ms access  How to establish client server connectivity to access ms access database on the server side? I have made the odbc connection. Plz help me in the coding part.. Dont know how to start
MS Access connct using flex with java
MS Access connct using flex with java  Hi All, Can anybody help me how to connect to the MS access database and getting the data using flex in java technology with tomcat server
How to insert or delete records in MS access database using jsp - JSP-Servlet
How to insert or delete records in MS access database using jsp  Hi friends please provide me a solution that i insert or delete record from a database using java server pages. I used the microsoft access 2003 database. PlZ
odbc MS EXCEL
odbc MS EXCEL  hey my whole database is stored in MS Excel. so please tell me that can we connect to that database. if yes, how to do that. please help me out i am doing it in netbeans can please tell me the steps
ms access
ms access  how to delete the autonumber from ms access using java delete code
How to Open Picture From M.S. Access Database using Java Servlet ?
How to Open Picture From M.S. Access Database using Java Servlet ?  ... Database But i m still not able to open this picture through Java using M.S. Access...="jdbc:odbc:MyDsn"; Connection conn=DriverManager.getConnection
Advertisements
 

 

 

DMCA.com