daily pastebin goal
1%
SHARE
TWEET

Untitled

a guest Jan 25th, 2016 76 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <%
  2.     Class.forName("oracle.jdbc.driver.OracleDriver");
  3.     Connection        c=DriverManager.getConnection("jdbc:oracle:thin:@localhost:1521:xe","system","system");
  4.  
  5.  
  6.     String s=request.getParameter("Question1");
  7.     String s1=request.getParameter("Question2");
  8.     String s2=request.getParameter("Question3");
  9.     String s3=request.getParameter("Question4");
  10.     String s4=request.getParameter("Question5");
  11.  
  12.  
  13.  
  14. PreparedStatement P=c.prepareStatement("insert into QUESTION values(?,?,?,?,?)");
  15. P.setString(1,s);
  16. P.setString(1,s1);
  17. P.setString(1,s2);
  18. P.setString(1,s3);
  19. P.setString(1,s4);
  20. int i = P.executeUpdate();
  21. if(i>0)
  22. {
  23. response.sendRedirect("EnterQuestion.jsp");
  24. }
  25. else{
  26.     out.println("Error");
  27. }
  28.  
  29.         %>
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top