title: How to call mysql stored procedure in C#
body: <p>I want to call a Mysql stored procedure from c# . I am running the same procedure in mysql query browser finely . This is about getting a maturity date from given input year , month , days  with current date . 
   <a href="https://i.stack.imgur.com/UYQOG.png" rel="nofollow noreferrer">This is the output </a>  </p>
  
  <pre><code>      DELIMITER $$
  
           DROP PROCEDURE IF EXISTS `passbook`.`maturity_date` $$
           CREATE DEFINER=`root`@`localhost` PROCEDURE `maturity_date`(IN `stdate` 
           DATE, IN `adyear` INT(4), IN `amonth` INT(2), IN `adays` INT(2), INOUT 
           `matdate` DATE)
           NO SQL
           Begin
           declare new_date , pstdate date;
  
           set new_date = stdate;
  
            if adyear &gt; 0 then
  
            SELECT date_add(stdate, INTERVAL adyear year) into pstdate;
  
            set new_date = pstdate;
            end if;
  
  
             if amonth &gt; 0 then
  
  SELECT date_add(new_date, INTERVAL amonth MONTH) into pstdate;
  set new_date = pstdate;
  end if;
  
  if adays &gt; 0 then
  
  SELECT date_add(new_date, INTERVAL adays DAY) into pstdate;
  set new_date = pstdate;
  end if;
  
  
  Set matdate = new_date;
  Select matdate;
  end $$
  
  DELIMITER ;
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/eUED0.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/eUED0.png" alt="getting error Image "></a></p>