private void createDefaultBugTypes() {
Connection myConnection;
String defaultBugTypes[] = {"Retour au bureau", "Blocage", "Résultats erronés", "Comportement anormal", "Erreur à l´installation", "Erreur d´accès aux sauvegardes", "Autre"};
for (int i=0; i<defaultBugTypes.length; i++) {
try {
myConnection = connect();
PreparedStatement myInsert = myConnection.prepareStatement("INSERT INTO APP.BUGTYPE (BUGTYPE_NAME) VALUES (?)");
myInsert.setString(1,defaultBugTypes[i]);
myInsert.executeUpdate();
myConnection.close();
} catch (SQLException e) {
out.println("Bug type insertion error");
out.println(e);
}
}
}