Stored procedure or function expects parameter which was not supplied

后端 未结 9 1323
梦谈多话
梦谈多话 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:27

    Just a headsup, it might save someone a lot of time soul searching. If you have followed the recommendation here, like using AddWithValue in order to pass a paramter on, and you have everything verified and yet you are still getting the error message "Not supplied", check whether you have set the CommandType property of the command object to CommandType.StoredProcedure.

    Not setting this property incurs the same message, believe me! Hope it helps someone.

提交回复
热议问题