title: Stored Procedures with Mysql connector
body: <p>I'm trying to call a simple stored procedure in c# 2010.
  With only a IN argument it's ok, but now with a OUT argument it's not working.</p>
  
  <p>In phpmyadmin :</p>
  
  <pre class="lang-sql prettyprint-override"><code>drop procedure if exists insert_artist;
  delimiter $$
  create procedure insert_student(IN name VARCHAR(100), OUT id INT)
  begin
  insert into student(name) values(name);
  set id = last_insert_id();
  end$$
  delimiter ;
  </code></pre>
  
  <p>Then using </p>
  
  <pre class="lang-sql prettyprint-override"><code>call insert_student("toto",@id);
  select @id;
  </code></pre>
  
  <p>It's working fine.</p>
  
  <p>Now, in c# :</p>
  
  <pre><code>using (MySqlConnection connection = new MySqlConnection(connectionString))
  {
      connection.Open();
      using (MySqlCommand command = connection.CreateCommand())
      {
          command.CommandText = "insert_student";
          command.CommandType = System.Data.CommandType.StoredProcedure;
          command.Parameters.AddWithValue("@name", "xxxx");
          command.Parameters.AddWithValue("@id",MySqlDbType.Int32);
          command.ExecuteNonQuery();
          Console.WriteLine("**** " + command.Parameters["@id"].Value);
      }
  }
  </code></pre>
  
  <p>Gives me an exception when executing <code>ExecuteNonQuery()</code> :</p>
  
  <blockquote>
    <p>OUT or INOUT argument 2 for routine insert_student is not a variable or NEW pseudo-variable in BEFORE trigger</p>
  </blockquote>
  
  <p>The same thing without the out argument in the stored procedure is working fine.
  Where is my mistake?</p>