Procedure expects parameter which was not supplied

后端 未结 12 1473

I\'m getting the error when accessing a Stored Procedure in SQL Server

Server Error in \'/\' Application.
Procedure or function \'ColumnSeek\' expects parame         


        
12条回答
  •  爱一瞬间的悲伤
    2020-12-02 18:41

    I came across same issue. And my parameter was having null value. So I resolved by handling null value. If someone is not sure runtime value and want to handle null then simply use this. (And you don't want to change the SP/function.) E.g.

    sp.Value = Template ?? (object)DBNull.Value;
    

提交回复
热议问题