a guest Oct 3rd, 2017 63 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. Class.forName("oracle.jdbc.driver.OracleDriver");
  2.             java.sql.Connection c= DriverManager.getConnection("jdbc:oracle:thin:@localhost:1521:xe","system","1234");
  3.             PreparedStatement ps=c.prepareStatement("insert into REGLIB (name,password,DOB,rollno,address,mobile,email,city,state,pin,ID) values(?,?,?,?,?,?,?,?,?,?,seq3.nextval)");
  4.             ps.setString(1,jT0.getText());
  5.             ps.setString(2, jT1.getText());
  6.             ps.setString(3, jT2.getText());
  7.             int roll=Integer.parseInt(jT3.getText());
  8.             ps.setInt(4,roll);
  9.             ps.setString(5, jT4.getText());
  10.             ps.setString(6,jT5.getText());
  11.             ps.setString(7, jT6.getText());
  12.             ps.setString(8,jT7.getText());
  13.             ps.setString(9,jT8.getText());
  14.                int pin=Integer.parseInt(jT9.getText());
  15.                ps.setInt(10,pin);
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