<jsp:include page="menu.jsp"></jsp:include>
<%@page language="java" import="java.util.*,java.sql.*,javax.swing.* ,java.lang.* " contentType="text/html"%>
<%            
	    
              
              
               
                 try
               {
               Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
           
               Connection con=DriverManager.getConnection("jdbc:odbc:sree","sree","sree");
               PreparedStatement pstmt = con.prepareStatement("Delete from sqb ");
               
               int x=pstmt.executeUpdate();
                if(x==0)
                  {

                  request.setAttribute("sree","<h2>All Questions are successfully deleted</h2>" );
                  RequestDispatcher dispatch=request.getRequestDispatcher("sdelete.jsp");
                  dispatch.forward(request,response);

              }
              else
                {
 

                  request.setAttribute("sree","<h1>Error</h1>" );
                  RequestDispatcher dispatch=request.getRequestDispatcher("sdelete.jsp");
                  dispatch.forward(request,response);
                }
     }
catch(SQLException e)
{
    out.println(e);
}            
                                                                            
 %>              