开发者

How to pass a SQL temp table to a C# stored procedure

开发者 https://www.devze.com 2022-12-13 08:54 出处:网络
What\'s the best way to pass a temp table to a C# stored procedure (SQL 2008)? Am I stuck passing the temp table name as text and running a select from C#?

What's the best way to pass a temp table to a C# stored procedure (SQL 2008)? Am I stuck passing the temp table name as text and running a select from C#?

I was hoping to use Ta开发者_如何学编程ble Value Parameters, but they don't appear to be supported in C# sprocs.


As xml (perhaps as nvarchar(max)) would be your best bet, but I've not tried it.


You are correct, TABLE type parameters are not supported Mapping CLR Parameter Data. You have other options though, eg. pass state as a BLOB (SqlBytes) or as XML (SqlXml).

0

精彩评论

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