Advertisement
mdporan

database

Mar 24th, 2017
156
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.81 KB | None | 0 0
  1. try
  2. {
  3. conn=Mysql_connect.connectDB();
  4. Statement stt = conn.createStatement();
  5.  
  6. PreparedStatement updateemp = conn.prepareStatement("INSERT INTO create_account(name,account,email,address,password) VALUES (?,?,?,?,?)");
  7. updateemp.setString(1,name.getText());
  8. updateemp.setString(2,ac.getText());
  9. updateemp.setString(3,email.getText());
  10. updateemp.setString(4,address.getText());
  11. updateemp.setString(5,password.getText());
  12. updateemp.executeUpdate();
  13. JOptionPane.showMessageDialog(null,"Acount Has Successfully Created!");
  14. conn.close();
  15. }
  16. catch(Exception e)
  17. {
  18. System.out.print("Do not connect to DB - Error:"+e);
  19. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement