title: How to call an Oracle Function using oracle .Net provider?
body: <p>When i use old Oracle Dll in my .net mvc project it works:</p>
  
  <pre><code>   cmd.CommandText = "dba.user_login";
     cmd.CommandType = CommandType.StoredProcedure;
     cmd.Parameters.Add("KUL", OracleType.VarChar).Value = userName;
     cmd.Parameters.Add("SIFRE", OracleType.VarChar).Value = pass;
     cmd.Parameters.Add("FLAG", OracleType.Float).Value = 1;
     cmd.Parameters.Add("HATA", OracleType.VarChar).Value = "error";
     cmd.Parameters.Add("result", OracleType.Float).Direction = ParameterDirection.ReturnValue;
  </code></pre>
  
  <p>But i want to use new oracle .net provider because of old oracle dll deprecated.  i tried this :</p>
  
  <pre><code>   cmd.CommandText = "dba.user_login";
     cmd.CommandType = CommandType.StoredProcedure;
     cmd.Parameters.Add("KUL", OracleDbType.Varchar2).Value = userName;
     cmd.Parameters.Add("SIFRE", OracleDbType.Varchar2).Value = pass;
     cmd.Parameters.Add("FLAG", OracleDbType.Single).Value = 1;
     cmd.Parameters.Add("HATA", OracleDbType.Varchar2).Value = "error";
     cmd.Parameters.Add("result", OracleDbType.Single).Direction = ParameterDirection.ReturnValue;
  </code></pre>
  
  <p>But it not works. Exception: ORA-06502: PL/SQL: numeric or value error: character to number conversion error\nORA-06512: at line 1
  Can anybody help me to fix this. Thank you.</p>