UPDATE
public boolean updateTable(){
Environment env = Environment.getStandardEnvironment(processData);
Database db = SystemWorkspace.getConnectionsWorkspace().getDatabase("Repository", env);
Table table = RepositoryUtil.getTable("Repository", "Table");
UpdateStatement updTable = new UpdateStatement(table, env.getSessionValues(), env.getDataTypeHandler(), db);
updTable.addColumnValue("CHAMP1", "VALEUR1");
updTable.addColumnValue("CHAMP2", "VALEUR2");
updTable.addWhere("CHAMP1", "VALEUR1");
updTable.addWhere("CHAMP2", "VALEUR2");
updTable.addWhere("CHAMP3", "VALEUR3");
try {
updTable.executeAndClose();
} catch (SQLException e) {
e.printStackTrace();
}
return true;
}
Ajouter un commentaire