Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- try
- {
- conn=Mysql_connect.connectDB();
- Statement stt = conn.createStatement();
- PreparedStatement updateemp = conn.prepareStatement("INSERT INTO create_account(name,account,email,address,password) VALUES (?,?,?,?,?)");
- updateemp.setString(1,name.getText());
- updateemp.setString(2,ac.getText());
- updateemp.setString(3,email.getText());
- updateemp.setString(4,address.getText());
- updateemp.setString(5,password.getText());
- updateemp.executeUpdate();
- JOptionPane.showMessageDialog(null,"Acount Has Successfully Created!");
- conn.close();
- }
- catch(Exception e)
- {
- System.out.print("Do not connect to DB - Error:"+e);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement