sbailliez 2004/11/11 10:46:36 Modified: src/main/org/apache/tools/ant/taskdefs SQLExec.java Log: Avoid calling getResultSet() multiple times when printing just in case Informix does not like it. This was per suggestion of Bohuslav Roztocil. PR: 27162 Revision Changes Path 1.68 +4 -5 ant/src/main/org/apache/tools/ant/taskdefs/SQLExec.java Index: SQLExec.java =================================================================== RCS file: /home/cvs/ant/src/main/org/apache/tools/ant/taskdefs/SQLExec.java,v retrieving revision 1.67 retrieving revision 1.68 diff -u -r1.67 -r1.68 --- SQLExec.java 23 Feb 2004 19:28:23 -0000 1.67 +++ SQLExec.java 11 Nov 2004 18:46:36 -0000 1.68 @@ -527,7 +527,7 @@ } } else { if (print) { - printResults(out); + printResults(resultSet, out); } } ret = statement.getMoreResults(); @@ -563,13 +563,12 @@ } /** - * print any results in the statement. + * print any results in the result set. + * @param rs the resultset to print information about * @param out the place to print results * @throws SQLException on SQL problems. */ - protected void printResults(PrintStream out) throws SQLException { - ResultSet rs = null; - rs = statement.getResultSet(); + protected void printResults(ResultSet rs, PrintStream out) throws SQLException { if (rs != null) { log("Processing new result set.", Project.MSG_VERBOSE); ResultSetMetaData md = rs.getMetaData();
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]