Stored procedure or function expects parameter which was not supplied

后端 未结 9 1154
梦谈多话
梦谈多话 2021-01-17 08:47

I am trying to insert data into a SQL Server database by calling a stored procedure, but I am getting the error

*Procedure or function \'Insertion\'

9条回答
  •  陌清茗
    陌清茗 (楼主)
    2021-01-17 09:45

    "There's only one Add method that's obsoleted, the method that accepts a string for the parameter name and an object for the value. As you noted, you should call AddWithValue instead for this scenario."

    http://social.msdn.microsoft.com/Forums/en-US/15bb16a4-0cf1-4289-b677-3b9d98f09298/parametersaddwithvalue-output-parameter-in-adonet-2?forum=adodotnetdataproviders

    Not all Parameter.Add methods are depreciated. How are you suppose to make an OUTPUT parameter? You have to use Parameter.Add for this.

提交回复
热议问题