About Question enthuware.ocpjp.v11.2.3644 :
Posted: Wed Jun 05, 2024 10:06 pm
The point 4 of explanation states:
The method stmt.getMoreResults() moves the pointer to the next result set? If the procedure returns more than 1 result set, how to iterate between the result sets?
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();
}