Error in call from C# code-behind to a stored procedure: "PLS-00306: wrong number or types of arguments in call to"
<p>I'm having this error when I call a stored procedure from my ASP.NET page's code-behind. I played with parameters and types but still couldn't figure out the reason.</p>

<p><strong>Error:</strong></p>

<blockquote>
  <p>ORA-06550: line 1, column 7: 
  PLS-00306: wrong number or types of arguments in call to 'PR_SECWEB_GET_MAINTENANCE' 
  ORA-06550: line 1,
  column 7: PL/SQL: Statement ignored</p>
</blockquote>

<p><strong>C# Code-behind method:</strong></p>

<pre><code>public static string GetMaintenanceFlag(string userType)
{
    OracleConnection oConnection = new OracleConnection(connectionString);
    OracleCommand oCommand = new OracleCommand();

    string maintenanceFlag = string.Empty;

    try
    {
        oCommand.CommandType = CommandType.StoredProcedure;
        oConnection.Open();

        oCommand.CommandText = GET_MAINTENANCE_FLAG;

        oCommand.Parameters.Add("v_userType", OracleDbType.Varchar2);
        oCommand.Parameters["v_userType"].Value = userType;

        oCommand.Parameters.Add("cv_1", OracleDbType.Varchar2, 100);
        oCommand.Parameters["cv_1"].Direction = ParameterDirection.Output;

        oCommand.Connection = oConnection;

        int cnt = oCommand.ExecuteNonQuery();
        maintenanceFlag = oCommand.Parameters["cv_1"].Value.ToString();

        return maintenanceFlag;
    }
    catch (Exception ex)
    {
        SecureWebExceptions oException = new SecureWebExceptions("CommonDAL", "GetMaintenanceFlag", ex);
        throw oException;
    }
    finally
    {
        if (oConnection.State == ConnectionState.Open)
            oConnection.Close();
    }
}
</code></pre>

<p><strong>Stored Procedure in Oracle:</strong></p>

<pre><code>create or replace PROCEDURE PR_SECWEB_GET_MAINTENANCE 
(
  v_userType IN VARCHAR2 DEFAULT NULL, 
  cv_1 OUT VARCHAR2
) 
AS 
BEGIN

  IF UPPER(v_userType)='INTERNAL' THEN
    select PARAMETER_VALUE INTO cv_1 from FIC_PARAMETER WHERE PARAMETER_NAME = 'MAINTENANCE_MODE_INTERNAL';
  ELSIF UPPER(v_userType)='EXTERNAL' THEN
    select PARAMETER_VALUE INTO cv_1 from FIC_PARAMETER WHERE PARAMETER_NAME = 'MAINTENANCE_MODE_EXTERNAL';
  END IF;

END;
</code></pre>