|
The SqlPipe Object
Listing 7. To send text to the caller (equivalent to the T-SQL Print command), you would use the SqlPipe.Send(string) method. [SqlProcedure(Name = "sp_SqlPipe_SendText")]
public static void SqlPipeTextDemo()
{
// Send text back to the caller through the SqlPipe
SqlContext.Pipe.Send(
"The time is: " +
DateTime.Now.ToShortTimeString());
}
|