My subject describes my problem exactly. I have an executeUpdate() command that updates an Orale database like:
int rows = statement.executeUpdate();
statement.close();
if (rows == 0) {
System.out.println("Zero rows updated
throw new MyException ("Zero rows were updated");
}
If I leave the check in, an exception is thrown and the database is eventually rolled back. If I take the check out then the database updates successfully. Is there any rare situations that executeUpdate could return 0 but still update successfully?
int rows = statement.executeUpdate();
statement.close();
if (rows == 0) {
System.out.println("Zero rows updated
throw new MyException ("Zero rows were updated");
}
If I leave the check in, an exception is thrown and the database is eventually rolled back. If I take the check out then the database updates successfully. Is there any rare situations that executeUpdate could return 0 but still update successfully?