…… String PRocCall; // Set the value of procCall to call a stored procedure. // … CallableStatement cstmt = connection.prepareCall(procCall); int retval = cstmt.execute(); if (retval == false) { // The statement returned an update count, so handle it. // … } else { // ResultSet ResultSet rs1 = cstmt.getResultSet(); // … retval = cstmt.getMoreResults(Statement.KEEP_CURRENT_RESULT); if (retval == true) { ResultSet rs2 = cstmt.getResultSet(); // Both ResultSets are open and ready for use. rs2.next(); rs1.next(); // … } } ……