If you encounter error Msg 11535, Level 16 while trying to execute a stored procedure, it’s because you didn’t define enough result sets in the WITH RESULT SETS
clause.
Some stored procedures return multiple result sets. When using the WITH RESULT SETS
clause, you need to define each expected result set. You need to do this even if you only want to change the definition of one or some of the result sets.
To fix this error, simply add the additional result sets to the WITH RESULT SETS
clause, each separated by a comma.
You could also fix it by removing the WITH RESULT SETS
clause, but I’ll assume you’re using it for a reason (i.e. you need to redefine the result set returned by the procedure).