|
|
@@ -571,21 +571,19 @@ public class SQLExec extends JDBCTask { |
|
|
|
|
|
|
|
|
ret = getStatement().execute(sql); |
|
|
ret = getStatement().execute(sql); |
|
|
updateCount = getStatement().getUpdateCount(); |
|
|
updateCount = getStatement().getUpdateCount(); |
|
|
resultSet = getStatement().getResultSet(); |
|
|
|
|
|
do { |
|
|
do { |
|
|
if (!ret) { |
|
|
|
|
|
if (updateCount != -1) { |
|
|
|
|
|
updateCountTotal += updateCount; |
|
|
|
|
|
} |
|
|
|
|
|
} else if (print) { |
|
|
|
|
|
printResults(resultSet, out); |
|
|
|
|
|
|
|
|
if (updateCount != -1) { |
|
|
|
|
|
updateCountTotal += updateCount; |
|
|
} |
|
|
} |
|
|
ret = getStatement().getMoreResults(); |
|
|
|
|
|
if (ret) { |
|
|
if (ret) { |
|
|
updateCount = getStatement().getUpdateCount(); |
|
|
|
|
|
resultSet = getStatement().getResultSet(); |
|
|
resultSet = getStatement().getResultSet(); |
|
|
|
|
|
if (print) { |
|
|
|
|
|
printResults(resultSet, out); |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
} while (ret); |
|
|
|
|
|
|
|
|
ret = getStatement().getMoreResults(); |
|
|
|
|
|
updateCount = getStatement().getUpdateCount(); |
|
|
|
|
|
} while (ret || updateCount != -1); |
|
|
|
|
|
|
|
|
log(updateCountTotal + " rows affected", Project.MSG_VERBOSE); |
|
|
log(updateCountTotal + " rows affected", Project.MSG_VERBOSE); |
|
|
|
|
|
|
|
|
|