Change how processing the results is done so as not to trigger error 20019

Attempt to initiate a new SQL Server operation with results pending.