srv_sendmsg (Extended Stored Procedure API)
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.
Sends a message to the client.
This function sends error or informational messages to the client. It is called once for each message to be sent.
Messages can be sent to the client with srv_sendmsg in any order before or after all rows (if any) have been sent with srv_sendrow. All messages, if any, must be sent to the client before the completion status is sent with srv_senddone.
To send messages in Unicode, use srv_wsendmsg rather than srv_sendmsg.
For more information see Unicode Data and Server Code Pages.
You should thoroughly review the source code of extended stored procedures, and you should test the compiled DLLs before you install them on a production server. For information about security review and testing, see this Microsoft Web site.