1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
|
String ref=recepForm.getRef();
String po=recepForm.getPO();
String note=recepForm.getNote();
String sql = "insert into gss_trans(no,type,id,date,act_id,dest_id,ext_ref,notes,no_po,date_limite,dest,approver,annuler) values('"+maxx+"','REC','"+whh+"',SYSDATE,'"+act+"','"+idfour+"',?,?,?,'','','','N')";
// préparation de la requête
PreparedStatement preparedStatement = con.prepareStatement(sql);
// on assigne une chaîne de caractères au troisième
preparedStatement.setString(1,ref);
preparedStatement.setString(2,note);
preparedStatement.setString(3,po);
// exécution de la requête
preparedStatement.executeUpdate(); |
Partager