Boa noite
estou com um problema nesse metodo:
[code]public boolean excluir(Integer idtReino, int idtSistema, String usrPessoa)
throws SQLException, FileNotFoundException, IOException {
boolean sucesso = false;
this.getCnn().setAutoCommit(false);
String query = “”;
String queryExclui = “”;
try {
queryExclui = "DELETE FROM ta_idioma_reino WHERE cod_reino= ?";
query = "DELETE FROM td_reino WHERE idt_reino=?";
PreparedStatementLogable opsDelete = new PreparedStatementLogable(this.getCnn(), queryExclui);
opsDelete.setInt(1, idtReino.intValue());
opsDelete.executeUpdate();
PreparedStatementLogable ops = new PreparedStatementLogable(this.getCnn(), query);
ops.setInt(1, idtReino.intValue());
String dsc_operacao = ops.toString();
if (ops.executeUpdate() == 1) {//Quando eu executo ele cai na exeption
sucesso = true;
}
if (sucesso) {
this.recordLog(ops, idtSistema, dsc_operacao, usrPessoa);
}
this.getCnn().commit();
ops.close();
} catch (Exception ex) {
this.getCnn().rollback();
this.recordError("Erro ao excluir reino id= " + idtReino, ex);
}
this.getCnn().setAutoCommit(true);
return sucesso;
}[/code]
Nao estou conseguindo resolver
se alguem puder me ajudar
Muito Obrigado