Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- try {
- String sql ="UPDATE murid SET nis = '"+nis.getText()+"', nama = '"+nama.getText()+"', jk = '"+jk.getText()+"', alamat = '"+al.getText()+"', kelas = '"+kelas.getText()+"', jurusan = '"+jurusan.getText()+"', agama = '"+agama.getText()+"', ortu = '"+ortu.getText()+"' WHERE nis = '"+nis.getText()+"'";
- java.sql.Connection con=(Connection)Db_Connection.configDB();
- java.sql.PreparedStatement pst=con.prepareStatement(sql);
- pst.execute();
- JOptionPane.showMessageDialog(this, "data berhasil di edit");
- } catch (Exception e) {
- JOptionPane.showMessageDialog(null, "Perubahan Data Gagal"+e.getMessage());
- }
- TampilData();
- kosong();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement