Advertisement
Guest User

Untitled

a guest
Jan 7th, 2019
172
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.52 KB | None | 0 0
  1. try{
  2. Connection con = DriverManager.getConnection("jdbc:mysql://localhost:3306/testegrila", "root" ,"");
  3. PreparedStatement posted = con.prepareStatement("INSERT INTO mytable (nume ,username, password) VALUES ('"+Numeutilizator.getText()+"','"+Username.getText()+"', '"+Parola.getText()+"')");
  4.  
  5. posted.executeUpdate();
  6. JOptionPane.showMessageDialog(null , "Cont creat");
  7.  
  8.  
  9. } catch(Exception e){System.out.print(e);}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement