How to execute a stored procedure within C# program

前端 未结 13 1668
别跟我提以往
别跟我提以往 2020-11-22 00:10

I want to execute this stored procedure from a C# program.

I have written the following stored procedure in a SqlServer query window and saved it as stored1:

<
13条回答
  •  花落未央
    2020-11-22 00:34

    You mean that your code is DDL? If so, MSSQL has no difference. Above examples well shows how to invoke this. Just ensure

    CommandType = CommandType.Text
    

提交回复
热议问题