ahmed fahd

ahmed fahd

  • NA
  • 58
  • 46.1k

error of procedure or function has too many arguments

Jan 17 2013 4:24 PM


this is the procedure

ALTER PROCEDURE dbo.Attendance_Table_Update
        @State_ nvarchar(50),@emp_id int,@Day_Dat date
AS
    UPDATE       Attendance_Table
    SET                State_ = @State_
    WHERE        (Emp_ID = @emp_id) AND (Day_Dat = @Day_Dat)
   

this is the usage of it



command.CommandType = CommandType.StoredProcedure
        command.CommandText = "attendance_table_update"
        command.Connection = con
        command.Parameters.AddWithValue("@emp_id", b._emp_num)
        command.Parameters.AddWithValue("@state_", b._emp_situation)
        command.Parameters.AddWithValue("@day_dat", b._day_date)

        con.Close()
        con.Open()

        command.ExecuteNonQuery()
        Return True
        con.Close()
      
        'End Try

        Return True


Answers (3)