boolean getMoreResults ( int current ) throws SQLException { checkClosed ( ) ; if ( resultIn == null || ! resultIn . isData ( ) ) { return false ; } if ( resultSetCounter == 0 ) { resultSetCounter ++ ; return true ; } if ( currentResultSet != null && current != KEEP_CURRENT_RESULT ) { currentResultSet . close ( ) ; } resultIn = null ; return false ; }
Note yet correct for multiple ResultSets . Should keep track of the previous ResultSet objects to be able to close them