title: Parameter not found in collection my SQL stored procedure?
body: <p>I have parameters like that </p>
  
  <pre><code>        Mysql_param[0] = new MySqlParameter("p_MainID", SqlDbType.Int);
          Mysql_param[0].Value = Convert.ToInt32 ( MID);
  
          Mysql_param[1] = new MySqlParameter("p_DetailID", SqlDbType.Int);
          Mysql_param[1].Value = Convert.ToInt32( DID);
  
          Mysql_param[2] = new MySqlParameter("p_UserID ", SqlDbType.Int);
          Mysql_param[2].Value = Convert.ToInt32(USERID== "" ? "0" : USERID);
  
          MySqlDataAdapter da = new MySqlDataAdapter(pobj_cmd);
              ds = new DataSet();
              da.Fill(ds);
  </code></pre>
  
  <p>I have stored procedure like that</p>
  
  <pre><code>CREATE DEFINER=`root`@`localhost` PROCEDURE `sp_HistoryInsertion`(
         IN p_MainID  int 
        , IN p_DetailID int
        , IN p_USERID   int
  )
      INSERT INTO history (`MainID`, `DetailID`, )
      VALUES (p_MainID, p_DetailID);              
  </code></pre>
  
  <p>But I get an error:</p>
  
  <blockquote>
    <p>{"Parameter 'p_USERID' not found in the collection."}</p>
  </blockquote>
  
  <p>Actually <code>p_USER</code> is auto increment in database that is later used in update and delete and select operations so I have to pass it as its is in every procedure so the same error related to that city_id is present in every where more then 6 stored procedures </p>
  
  <p>The datatypes are <code>INT</code> for every column</p>