SQL Server implements stored procedures. If you issue a single SQL command that is the name of a stored procedure to the local application, it can result in more than one set of result rows being returned. If your stored procedure does this, you can use the TRANSACT-SQL print command in the stored procedure to indicate that a result set has completed. You can then trap this condition in your ESL program by looking for a response to a line with the message string. See the description of the message command for details.