<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>JSP Page</title>
        <link href="css/sri.css" rel="stylesheet" type="text/css"></link>        
</head>
<body background="f:\backgrounds\bg.jpg">
    
    <center><table bgcolor="bisque" border=2>
    <tr bgcolor="#990000" align="middle"><tr align="center"  ><th>S.NO</th><th>Question</th><th>Answer</th></tr>
<%@page language="java" import="java.util.*,java.sql.*,javax.swing.* " contentType="text/html"%>
<jsp:include page="menu.jsp"></jsp:include>
<%   
		
           try {
            
               Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
           
            Connection con=DriverManager.getConnection("jdbc:odbc:sree","sree","sree");
           
            PreparedStatement pstmt = con.prepareStatement("select * from fqb order by qid");
                    
            ResultSet rs= pstmt.executeQuery();
           while(rs.next())
            {
                 
                 
                 out.println("<tr><td align=center>"+rs.getInt(1)+"&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp</td>");
                 out.println("<td align=left>"+rs.getString(2)+"&nbsp&nbsp&nbsp&nbsp</td>");
                 out.println("<td align=left>"+rs.getString(3)+"&nbsp&nbsp&nbsp&nbsp</td>");
               
                 
             }    
                               
             }
          
                 
		catch(ClassNotFoundException s)
        { 
	out.println("loaderror");
   	}
		catch(SQLException e)
        { 
	out.println(e);
   }
                       
          %> 
</table></center>

<br><br><br>
<center><input type="submit" value="PRINT" name="Print"  onclick="window.print()"  /></center>



</body>    
     
  </html>