3
Answers

error of procedure or function has too many arguments

Ask a question
ahmed fahd

ahmed fahd

11y
1.7k
1


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)