Code: Select all
boolean hasResults = stmt.execute();
//check if the stored proc has returned one or more ResultSets
while (hasResults) {
ResultSet rs = stmt.getResultSet();
// process result set
hasResults = stmt.getMoreResults();
}