title: How I can fix the next error in Visual Studio 2010 C#?
body: <p>I'm working in the project to the faculty, called loans project.</p>
  
  <p>This is for SQL Server, <code>ConsultaClientes</code> is the stored procedure:</p>
  
  <pre><code>public static void OrdenarClienteSP(Cliente oCliente)
  {
      SqlConnection cnn = new SqlConnection(ClasesBase.Properties.Settings.Default.conex);
  
      SqlCommand cmd = new SqlCommand();
      cmd.CommandText = "ConsultaClientes";
      cmd.CommandType = CommandType.StoredProcedure;
      cmd.Connection = cnn;
  
      // Parametros del comando
      cmd.Parameters.AddWithValue("@ape", oCliente.Cli_Apellido);
  
      // Abrir la conexion
      cnn.Open();
  
      // Ejecuta la consulta (insert)
      cmd.ExecuteNonQuery();     // Here the error happens
  
      // Cierro la conexion
      cnn.Close();
  }
  </code></pre>
  
  <p>Here is the view called <code>FrmGestionCliente</code>, in which you click with a radio button for the order that is in the data seen ascending from the last name</p>
  
  <pre><code>private void btnOrdenarCliente_Click(object sender, EventArgs e)
  {
      Cliente oCliente = new Cliente();
  
      //oCliente.Cli_Apellido = (string)txtApellido.ToString();
  
      if (rbnApellido.Checked)
      {
          TrabajarCliente.OrdenarClienteSP(oCliente);
      }
  }
  </code></pre>
  
  <p>Here is the stored procedure <code>ConsultaClientes</code>:</p>
  
  <pre><code>ALTER PROCEDURE ConsultaClientes
      /*
      (@parameter1 INT = 5,
       @parameter2 datatype OUTPUT)
      */
      (@ape VARCHAR(50))
  AS
      /* SET NOCOUNT ON */
      SELECT * 
      FROM Cliente 
      ORDER BY CLI_Apellido DESC
  
      RETURN
  </code></pre>
  
  <p>Error:</p>
  
  <blockquote>
    <p>Procedure or function 'ConsultaClientes' expects parameter '@ape', which was not supplied</p>
  </blockquote>