Besoin d'aide sur mon application
Bonjour tout le monde,
Voila j'ai un projet d’études est de créer une application de gestion de paiement, le problème est que le catch s'execute est je ne sais pas pourquoi ! :(:(:(:?:?:?
Voila je code java avec sql :
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13
| try{
pst=con.prepareStatement("insert into paiement(NUMAPP,NUMRECUE,MODEP,NUMP,MOISP,ANNEEP,DATEP) values(?,?,?,?,?,?,?)");
pst.setInt(1, Integer.parseInt(appField.getText()));
pst.setInt(2, Integer.parseInt(recueField.getText()));
pst.setString(3, mode.getSelectedItem().toString());
pst.setString(4, NpaiemantField.getText());
pst.setString(5, monthCombo.getSelectedItem().toString());
pst.setInt(6, Integer.parseInt((String)yearCombo.getSelectedItem()));
pst.setString(7, ddpChooser.getText());
pst.execute();
JOptionPane.showMessageDialog(null, "paiement réussi");
}catch(SQLException e){JOptionPane.showMessageDialog(null, "paiement Erreur");} |
et voila La BDD oracle :
Code:
1 2 3 4 5 6 7 8
| create table paiement(
NUMAPP number(4) NOT NULL constraint NUMAPP_fkEY REFERENCES RESIDENTS(NUMAPP),
numRecue number(10) NOT NULL,
ModeP varchar2(10) NOT NULL,
NumP varchar2(30),
MoisP varchar2(10) NOT NULL,
anneeP number(4) NOT NULL,
DateP date); |
Merci