views:

26

answers:

1

hello, I have CLR which references Web service, into CLR i have one method with calling one of Web services method. What i need is, to make this CLR method return me information and show it in Result tab (in SQL server) . I printed result in SQL tab Messages with SqlContext.Pipe.Send. How can I do the same in Result tab, like it's sample Selected table or Executed Procedure.

A: 

I already did it. So for them who had the same assue: If you have many rows and want to return all them then you have to do: For first row use SqlContext.Pipe.SendResultsStart(new SqlDataRecord(new(new SqlMetaData("name", SqlDbType.NVarChar, 500))); For second and more rows use SqlContext.Pipe.SendResultsRow(new SqlDataRecord(new(new SqlMetaData("name", SqlDbType.NVarChar, 500))) and after for SqlContext.Pipe.SendResultsEnd();

scatterbraiin