2.2.2.7 Response Completion
The client reads results in logical units and can tell when all results have been received by examining the DONE token data stream.
When executing a batch of SQL statements, the server MUST return a DONE token data stream for each set of results. All but the last DONE will have the DONE_MORE bit set in the Status field of the DONE token data stream. Therefore, the client can always tell after reading a DONE whether or not there are more results. For more details, see section 2.2.7.6.
For stored procedures, completion of SQL statements in the stored procedure is indicated by a DONEINPROC token data stream for each SQL statement and a DONEPROC token data stream for each completed stored procedure. For more details about DONEINPROC and DONEPROC tokens, see section 2.2.7.7 and 2.2.7.8, respectively.