title: Procedure or function expects parameter ' which is not supplied
body: <p>hello friends i face one issue for load the data to grid view.</p>
  
  <p>the page load event call the one method like loaddata() inside i write the code this</p>
  
  <pre><code>  using (SqlConnection Sqlcon = new SqlConnection(strCon))
          {
              using (SqlCommand cmd = new SqlCommand())
              {
                  Sqlcon.Open();
                  cmd.Connection = Sqlcon;
  
                  cmd.CommandType = CommandType.StoredProcedure;
                  cmd.CommandText = "SP_Marketing";
                  //cmd.Parameters.Add(new SqlParameter("@Sno", (object) ?? null.Value));
                  cmd.Parameters.Add(new SqlParameter("@pvchAction", SqlDbType.VarChar,50));
                  cmd.Parameters["@pvchAction"].Value = "select";
                  cmd.Parameters.Add("@pIntErrDescOut", SqlDbType.Int).Direction = ParameterDirection.Output;
  
                  SqlAda = new SqlDataAdapter(cmd);
                  ds = new DataSet();
                  SqlAda.Fill(ds);
                  GridViewSample.DataSource = ds;
                  GridViewSample.DataBind();
              }
          }
  </code></pre>
  
  <p>the find the store procedure records in sqlada caught error like"Procedure or function expects parameter @dateemailed  which is not supplied"</p>
  
  <pre><code>ALTER PROCEDURE SP_Marketing          
  (            
   @Sno   int  =0,            
   @DateEmailed datetime,            
   @DateResponded datetime,            
   @EmailRep  varchar(100)=null,    
   @Type   varchar(100)=null,    
   @Country  varchar(100)=null,    
   @State  varchar(100)=null,    
   @NameoftheCompany varchar(100)=null,    
   @website  varchar(100)=null,    
   @FirstName  varchar(100)=null,    
   @LastName  varchar(100)=null,    
   @Title   varchar(100)=null,    
   @Email   varchar(100)=null,    
   @Telephone  varchar(100)=null,    
   @Capabilities varchar(100)=null,    
   @Focus   varchar(100)=null,    
   @pvchCreatedBy  varchar(100)=null,            
   @pvchAction   varchar(50)=null,            
   @pIntErrDescOut  int output    
  )            
  AS            
   BEGIN            
  
     if(@pvchAction='select')         
      begin    
       SELECT sno,Dateemailed,dateresponded,emailrep,[type],country,[state],     , nameofthecompany,website,Firstname,Lastname,Title,email,telephone,
  capabilities,  Focus FROM Emailmarketing  WHERE active=1  
    end
  
  
  else if(@pvchAction='insert')    
    begin    
    INSERT INTO EmailMarketing(DateEmailed,DateResponded,EmailRep,[Type],    
    Country,[State],NameoftheCompany,website,FirstName,LastName,Title,Email,Telephone,Capabilities,Focus,Createdby,CreatedDt,Active)VALUES(@DateEmailed,@DateResponded,@EmailRep,@Type,    
    @Country,@State,@NameoftheCompany,@website,@FirstName,@LastName,@Title,@Email,@Telephone,@Capabilities,@Focus,@pvchCreatedBy,GETDATE(),1);    
  
    end    
    else if(@pvchAction='update')    
    begin    
    UPDATE EmailMarketing SET DateEmailed=@DateEmailed,DateResponded=@DateResponded,EmailRep=@EmailRep,[Type]=@Type,Country=@Country,[State]=@State,NameoftheCompany=@NameoftheCompany,website=@website,FirstName=@FirstName,LastName=@LastName,Title=@Title,Email=@Email,Telephone=@Telephone,Capabilities=@Capabilities,Focus=@Focus,Updatedby=@pvchCreatedBy,UpdatedDt=GETDATE()    
    WHERE Sno=@Sno;    
    end    
    else if(@pvchAction='delete')    
    begin    
    UPDATE   EmailMarketing SET Active=@pvchAction WHERE Sno=@Sno;    
    end    
  
      IF (@@ERROR &lt;&gt; 0)             
     BEGIN             
    SET @pIntErrDescOut = 1            
     END            
    ELSE            
     BEGIN            
    SET @pIntErrDescOut = 0            
     END     
  
  
  
  END
  </code></pre>