1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
|
String sql="update user set nom = ?, nomsession = ?,servid =?, motdepasse = ? where numero = ?";
try {
String comboserv =cmbservice.getSelectedItem().toString();
pst=con.prepareStatement(sql);
pst.setString(1, txtnom.getText());
pst.setString(2, txtnomsession.getText());
pst.setString(3, serviceMap.get(comboserv));
pst.setString(4, txtmotdepasse.getText());
pst.setString(5, txtmotdepasse.getText());
pst.executeUpdate();
JOptionPane.showMessageDialog(null, "Updated");
AfficherProfil();
}catch(Exception e){
JOptionPane.showMessageDialog(null, "Erreur modification profil\n"+e.getMessage()); |
Partager