1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
| public static void execute()
{
try {
String requete = "INSERT INTO utilisateur (user_id,user_nom,user_prenom,user_password,user_datenaissance,user_sexe,user_villenaissance,user_adresse,user_taille)";
requete+="VALUES (?,?,?,?,?,?,?,?,?);";
PreparedStatement statement = conn.prepareStatement(requete);
statement.setObject(1,new Integer(16));
statement.setObject(2,ZDialogInfo.nom);
statement.setObject(3,ZDialogInfo.prenom);
statement.setObject(4,ZDialogInfo.password);
statement.setObject(5,ZDialogInfo.dateNaissance);
statement.setObject(6,ZDialogInfo.sexe);
statement.setObject(7,ZDialogInfo.lieu);
statement.setObject(8,ZDialogInfo.adresse);
statement.setObject(9,ZDialogInfo.taille);
statement.executeUpdate();
} catch (SQLException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
} |
Partager