Q:

PLS-00306: wrong number or types of arguments in call to 'USP_SCHEMAS_ADDNEWVERSION'

I have matched all the arguments with the oracle stored procedure and they appear to be same, but I am still getting this error.
This is using Oracle.ManagedDataAccess.Client.OracleCommand
OracleCommand command = new OracleCommand(sqlCommand, this.Connection);
command.CommandType = CommandType.StoredProcedure;
command.Transaction = this.Transaction;

command.Parameters.Add(Common.CreateOracleParameterObj("STR_SCHEMANAME", OracleDbType.Varchar2, schema.Name, ParameterDirection.Input));
command.Parameters.Add(Common.CreateOracleParameterObj("INT_CREATEDBYID", OracleDbType.Int32, schema.CreatedBy, ParameterDirection.Input));
command.Parameters.Add(Common.CreateOracleParameterObj("DATE_CREATIONDATE", OracleDbType.Date, System.DateTime.Now, ParameterDirection.Input));
command.Parameters.Add(Common.CreateOracleParameterObj("INT_APPROVEDBYID", OracleDbType.Int32, schema.ApprovedBy, ParameterDirection.Input));
command.Parameters.Add(Common.CreateOracleParameterObj("DATE_APPROVALDATE", OracleDbType.Date, System.DateTime.Now, ParameterDirection.Input));
command.Parameters.Add(Common.CreateOracleParameterObj("INT_STATUSID", OracleDbType.Int32, schema.StatusId, ParameterDirection.Input));
command.Parameters.Add(Common.CreateOracleParameterObj("STR_DESCRIPTION", OracleDbType.Varchar2, schema.Description, ParameterDirection.Input));
command.Parameters.Add(Common.CreateOracleParameterObj("INT_NEWVERSIONTYPE", OracleDbType.Int32, Convert.ToInt32(schema.SaveAs), ParameterDirection.Input));
command.Parameters.Add(Common.CreateOracleParameterObj("IN_MAJVER", OracleDbType.Int32, Convert.ToInt32(schema.MajorVersion), ParameterDirection.Input));
command.Parameters.Add(Common.CreateOracleParameterObj("IN_MINVER", OracleDbType.Int32, Convert.ToInt32(schema.MinorVersion), ParameterDirection.Input));

command.Parameters.Add(Common.CreateOracleParameterObj("INT_RESULT", OracleDbType.Int32, 0, ParameterDirection.Output));

command.ExecuteNonQuery();

public static OracleParameter CreateOracleParameterObj(string parameterName, OracleDbType oracleType, object Val, ParameterDirection parameterDirection)
{
    OracleParameter _oracleParameter = new OracleParameter();
    _oracleParameter.ParameterName = parameterName;
    _oracleParameter.OracleDbType = oracleType;
    _oracleParameter.Direction = parameterDirection;

    if ((parameterDirection == ParameterDirection.Input) || (parameterDirection == ParameterDirection.InputOutput))   
    {
        switch (oracleType)
        {

            case OracleDbType.Date:
                _oracleParameter.Value = (System.DateTime)Val;
                break;
            case OracleDbType.Int32:
                _oracleParameter.Value = (Int32)Val;
                break;
            case OracleDbType.Varchar2:
                _oracleParameter.Value = Val as String;
                break;
            default:
                break;
        }
    }
    return _oracleParameter;
}

create or replace PROCEDURE "USP_SCHEMAS_ADDNEWVERSION"
(
STR_SCHEMANAME IN VARCHAR,
INT_CREATEDBYID IN NUMBER,
DATE_CREATIONDATE IN DATE,
INT_STATUSID IN NUMBER,
INT_APPROVEDBYID IN NUMBER,
DATE_APPROVALDATE IN DATE,
STR_DESCRIPTION IN VARCHAR,
INT_NEWVERSIONTYPE IN INT,
INT_RESULT OUT NUMBER,
IN_MAJVER IN NUMBER,
IN_MINVER IN NUMBER
) AS

A:

The reason was the order of the parameters. I thought, order doesn't make any difference, but when I re-ordered the parameters to be same as stored procedure, it worked.
Later, I found that using below rectifies this problem and exact ordering is not required then:-
oracleCommand.BindByName = true;

