title: Procedure or Function expects parameter which was not supplied?
body: <p>When I run the code below I get an error message:</p>
  
  <blockquote>
    <p>Msg 201, Procedure stp_DespatchedJob, Line 0 Procedure or Function
    'stp_DespatchedJob' expects parameter '@JobStatusId', which was not
    supplied</p>
  </blockquote>
  
  <pre><code>set ANSI_NULLS ON
  set QUOTED_IDENTIFIER ON
  go
  
  
  ALTER PROCEDURE [dbo].[stp_DespatchedJob]
  (
    @jobId as bigint,
    @DriverId int,
    @HasPda bit,
    @enablePda bit,
    @IsAdvanceJob bit,
    @IsAutodespatchedJob bit,
    @Controller varchar(100),
    @JobStatusId int
  
  )
  AS
  Begin
  
       if(@enablepda=1 and @haspda=1)
       BEGIN
           UPDATE BOOKING
              SET BookingStatusId=@JobStatusId,JobOfferDateTime=getdate()
                  ,DriverId=@DriverId,despatchdatetime=getdate()
                  ,Despatchby = @Controller
           where id=@jobId
  
  
       END
  
       ELSE
       BEGIN
  
         declare @fleetMasterId int
          select @fleetMasterId=fleetMasterId from fleet_DriverQueueList where driverId=@driverId and status=1
  
  
           UPDATE BOOKING
              SET BookingStatusId=2,DriverId=@DriverId,despatchdatetime=getdate(),FleetMasterId=@FleetMasterId,Despatchby = @Controller
             where id=@jobId
  
        END
  
  
       if(@IsAdvanceJob=1 and  @IsAutodespatchedJob=1) 
       BEGIN
  
           Update booking_autodespatch set  despatched=1 where bookingId=@jobId
       END
  
  End
  </code></pre>
  
  <p>What does this mean? Why am I getting this error? How to get rid of that ?</p>