title: MySQL/C# Stored Procedure Not Returning Value
body: <p>I have been having difficulty returning a value to a C# application from a Stored Procedure. The Procedure is returning a value in MySql workbench but not C#. In the C# Output there is no value being displayed. The following Procedure and method i call are included below:</p>
  
  <pre><code>            /*
              CREATE PROCEDURE `proc_FindChildID` (OUT CID VARCHAR(6))  
              BEGIN  
  
                  SELECT MAX(ChildID) INTO @CID FROM Child;
                  SET @CID = SUBSTRING(@CID FROM 1); 
                  SELECT @CID;
              END //
              */
  
              public bool callProcedure()
              {
                  if (this.OpenConnection() == true)
                  {
                      MySqlCommand command = connection.CreateCommand();
                          command.CommandType = CommandType.StoredProcedure;
                          command.CommandText = "proc_FindChildID";
  
                          command.Parameters.Add(new MySqlParameter("@CID", MySqlDbType.VarChar, 6));
                          command.Parameters["@CID"].Direction = ParameterDirection.Output;
                          command.ExecuteNonQuery();
  
                          string t_return = command.Parameters["@CID"].Value.ToString();
                          Console.WriteLine("ID:" + t_return);
  
                      this.CloseConnection();
                      return true;
                  }
                  else
                  {
                      return false;
                  }
              }
  </code></pre>