Quantcast
Channel: Teradata Forums - All forums
Viewing all articles
Browse latest Browse all 27759

Question about using Queryband in a macro called from a JAVA program - response (2) by Tuen

$
0
0
after hacking around with the example code, I was able to figure out the issue.  The set query_band doesn't actually return any thing to resultset.  we were checking for something when we should have been checking for null with the first resultset and then move to the next resultset.   this is what the crude code looked like boolean firstResult = stmt.execute(sMacroExec); ResultSet rs = stmt.getResultSet(); if (rs == null) { System.out.println("The first resultset is null"); if (stmt.getMoreResults() == false) { throw new IllegalStateException("Bad Result"); } rs = stmt.getResultSet(); while (rs.next()) { System.out.println(rs.getString(1)); } }

Viewing all articles
Browse latest Browse all 27759

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>