Procedure or function '' expects parameter '', which was not supplied.

Many time you may come across the below. This might be when you are executing a stored procedure or a function or error might have been caught in Application.

"Msg 201, Level 16, State 4, Procedure , Line 0
Procedure or function '' expects parameter '', which was not supplied."

What does it mean. The error itself is self explanatory. You have either created a Stored Procedure or a function which accepts some parameter and by default its not null and you try to execute the Stored procedure or function without passing the mandatory required parameter, An example if below.

You Have some tables related to information of student and you have created a Stored Procedure which returns the data for a Student.

CREATE Procedure usp_GetStudentDetails
@Student_ID as Int,
@Student_Dept as nvarchar(50)
AS
BEGIN
Your Select Code Here
END

Then you try to execute the Stored Procedure as Exec usp_GetStudentDetails or may be a Application developer is calling this stored procedure in application as Exec usp_GetStudentDetails, it throws the above error.

Ideal way of executing the above stored procedure is

EXEC usp_GetStudentDetails @Student_ID = 111,@Student_Dept = 'AppliedScience'
Or
Exec usp_GetStudentDetails 111,'AppliedScience'