When the schema is finished, you will create an instance of SqlDataRecord and populate it with data:
SqlDataRecord record = new SqlDataRecord(fields);
record.SetInt32(0, 1001);
record.SetString(1, "LeaseLeaseLease Inc.");
record.SetString(2, "123-456-7890");
record.SetDateTime(3, DateTime.Now);
record.SetSqlMoney(4, 2000);
As the last step, you will send the record through the pipe to the caller:
SqlContext.Pipe.Send(record) ;
The data which is returned to the client in tabular format is accomplished by the SqlPipe object. which is obtained by using the Pipe property of the SqlContext class, the SQLPipe has a method as Send, By calling the Send method of the SqlPipe object data can be transmitted to the client application.