开发者

How to create CLR with return result

开发者 https://www.devze.com 2023-01-05 06:38 出处:网络
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

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 ca开发者_如何学Cn I do the same in Result tab, like it's sample Selected table or Executed Procedure.


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();

0

精彩评论

暂无评论...
验证码 换一张
取 消