This feature will be removed in a future version of Microsoft SQL Server. Do not use this feature in new development work, and modify applications that currently use this feature as soon as possible. Use CLR Integration instead.
When sending a result set to Microsoft SQL Server, the extended stored procedure should call the appropriate API as follows:
The srv_sendmsg function may be called in any order before or after all rows (if any) have been sent with srv_sendrow. All messages must be sent to the client before the completion status is sent with srv_senddone.
The srv_sendrow function is called once for each row sent to the client. All rows must be sent to the client before any messages, status values, or completion statuses are sent with srv_sendmsg, the srv_status argument of srv_pfield, or srv_senddone.
Sending a row that has not had all its columns defined with srv_describe causes the application to raise an informational error message and return FAIL to the client. In this case, the row is not sent.