title: How do you pass an output parameter from vb.net to a mysql stored procedure?
body: <p>I am using the .net connector with mysql 5.5. When I try to call a stored procedure with an "out" parameter, I get the message <code>OUT or INOUT argument 2 for routine</code> <em>name</em> <code>is not a variable or NEW pseudo-variable in BEFORE trigger</code> at <code>cmd.ExecuteNonQuery()</code>.</p>
  
  <p>What is wrong?</p>
  
  <p>vb code:</p>
  
  <pre><code>cmd = New MySqlCommand("call testme(@id, @count)", conn)
  cmd.Parameters.AddWithValue("@id", id) ' "id" and "count" are integer variables
  cmd.Parameters.AddWithValue("@count", count)
  cmd.Parameters("@count").Direction = ParameterDirection.Output
  cmd.ExecuteNonQuery()
  </code></pre>
  
  <p>mysql stored procedure:</p>
  
  <pre><code>CREATE PROCEDURE testme(in taxid integer, out imageDescCount integer)
  BEGIN
  set imageDescCount = 23;
  End
  </code></pre>