diff --git a/src/main/org/apache/tools/ant/taskdefs/SQLExec.java b/src/main/org/apache/tools/ant/taskdefs/SQLExec.java index 998fc9a7c..199812b44 100644 --- a/src/main/org/apache/tools/ant/taskdefs/SQLExec.java +++ b/src/main/org/apache/tools/ant/taskdefs/SQLExec.java @@ -554,7 +554,7 @@ public class SQLExec extends JDBCTask { ret = statement.getMoreResults(); updateCount = statement.getUpdateCount(); resultSet = statement.getResultSet(); - } while ((resultSet != null) || (updateCount != -1)); + } while (ret); log(updateCountTotal + " rows affected", Project.MSG_VERBOSE);