How to pass large number of parameters in stored procedure from code to SQL Server

前端 未结 4 1612
情话喂你
情话喂你 2021-01-24 05:13

How to pass a large number of parameters (say 20+) to stored procedure from code?

Like we can group all the parameters in one class object and then pass it across, but h

4条回答
  •  不要未来只要你来
    2021-01-24 05:42

    The Best way to do it in 2.0 is to pass an XML containing all your parameters to the stored procedure and then use OPENXML to obtain each paramters. Use it however you want then in the SP.

    Refer these links

    Passing Parameters as Xml to a Stored Procedure and http://www.eggheadcafe.com/articles/20030627c.asp

提交回复
热议问题