Bonjour à tous j'ai une instruction d'insertion qui marche bien:
state.executeUpdate("INSERT INTO employe(code,nom,prenoms,direction,tel,mail) VALUES('"+txt_code.getText()+"','"+txt_nom.getText()+"','"+txt_prenoms.getText()+"','"+cb_direction.getSelectedItem()+"','"+tel+"','"+mail+"')");
mais seulement quand le txt_nom.getText par exemple ou le txt_prenoms.getText comporte une apostrophe il ya erreur d'enregistrement dans la base de données...
que quelqu'un m'aide, ça commence à me saouler cette histoire. je sais pas par ou commencer
Partager