Q:

Error when calling stored procedure from C#

Here's my C# code
SqlCommand _dbTempCommand;
SqlDataAdapter _dbTempAdapter;

_dbTempCommand = new SqlCommand();
_dbTempCommand.Connection = this.DbSQLConnection;
_dbTempAdapter = new SqlDataAdapter();

_dbTempCommand.CommandType = CommandType.StoredProcedure;
_dbTempCommand.CommandText = "spUserPOs";
_dbTempCommand.Parameters.Add(new SqlParameter("@EmployeeID",SqlDbType.Int)).Value = Convert.ToInt16(EmpID);
_dbTempAdapter.Fill(_objAppData._dsPOTrackerDB_LocalCopy, "UserPOs");

And here's my SQL server stored procedure
ALTER PROCEDURE [dbo].[spUserPOs]
   @EmplopyeeID int
AS
BEGIN
    SET NOCOUNT ON;

    SELECT PO_No, PO_RaisedOn, PO_Date, PO_ExpDelDate, PO_Remarks, PO_Status, PO_SubTotalAmt, PO_TotalAmt, PO_VATRate, PO_ExpenseType, PO_CurrencyID, PO_DeliveryLocID
        FROM tbPO_header WHERE PO_Raisedby = @EmplopyeeID  ORDER BY PO_No;

END

When I run this I get an error as -

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

I checked, the parameter is added with correct value.
Could someone please help resolve this.
Thanks.

A:

Seriously ?
Your stored procedure quotes a parameter name of "EmplopyeeID".
Your code is sending a parameter called "EmployeeID".
Spot the difference.
EmplopyeeID

EmployeeID

