title: C# Oracle Function call
body: <p>Can anybody suggest what wrong with this function call. There is no name for the return variable, not sure that makes any issue. This works correctly in pl sql.</p>
  
  <hr>
  
  <pre><code>oracle function code:
     FUNCTION GETSTATUS (
     p_param1         in varchar2,
     p_param2    in number,
     p_param3       out varchar2)
     return boolean
     is
     return true;
     END GETSTATUS;
  </code></pre>
  
  <hr>
  
  <p>ODP.Net version - 32 bit  Oraclient10201_win32</p>
  
  <p>C# Code</p>
  
  <hr>
  
  <pre><code>var cmd = new OracleCommand("tk_ccc.GETSTATUS ", connweb);
  cmd.CommandType = CommandType.StoredProcedure;
  cmd.BindByName = true;
  cmd.Parameters.Add("Return_Value", OracleDbType.Char, 1,    ParameterDirection.Output);
  var prm1 = new OracleParameter("p_param1", OracleDbType.Varchar2, 20,  ParameterDirection.Input) { Value = "1649983" };
  cmd.Parameters.Add(prm1);
  var prm2 = new OracleParameter("p_param2", OracleDbType.Int32,  ParameterDirection.Input) { Value = 1 };
  cmd.Parameters.Add(prm1);
  var prm3 = new OracleParameter("p_param3", OracleDbType.Varchar2, 100,  ParameterDirection.Output);
  cmd.Parameters.Add(prm1);
  var ret = cmd.ExecuteNonQuery();
  </code></pre>
  
  <hr>
  
  <p>Error message:</p>
  
  <blockquote>
    <p>ORA-06550: line 1, column 7:\nPLS-00306: wrong number or types of arguments in call to 'GETSTATUS'\nORA-06550: line 1, column 7:</p>
    
    <p>PL/SQL: Statement ignored</p>
  </blockquote>