我写了一个简单的存储过程,我无法在代码中找到问题
存储过程:
ALTER PROCEDURE dbo.BestellDetail_Delete
-- Add the parameters for the stored procedure here
@RefId AS int
AS
-- Insert statements for procedure here
DELETE FROM BestellDetails
WHERE RefBestellId = @RefId
RETURN
C# 代码
SqlCommand cmdBestellDetailsDELETE = new SqlCommand("BestellDetail_Delete", conn);
cmdBestellDetailsDELETE.Parameters.AddWithValue("@RefId", 35);
cmdBestellDetailsDELETE.ExecuteNonQuery();
错误:
过程或函数“BestellDetail_Delete”需要参数“@RefId”,但未提供该参数。
那么谁能告诉我我在这里做错了什么?