title: ORA-06550 wrong number or types of arguments when calling Oracle stored procedure
body: <pre><code>procedure select_card_transaction(trans_id   nvarchar2,
                                      usr_id    number,
                                      Quantity out number) is
    begin
      select count(*)
        into Quantity
        from user_cards u
       where u.transaction_id = trans_id
         and u.user_id = usr_id;
    end;
  </code></pre>
  
  <p><strong>and Consuming it:</strong></p>
  
  <pre><code>using(var conn = new OracleConnection(Settings.Default.OraWUConnString))
              { 
                  var cmd = conn.CreateCommand();
                  cmd.CommandText = "for_temporary_testing.select_card_transaction";
                  cmd.CommandType = CommandType.StoredProcedure;
  
  
  
                  cmd.Parameters.AddWithValue("trans_id", TransactionID);
                  cmd.Parameters.AddWithValue("usr_id", UserID);
  
                  var q = new OracleParameter("Quantity", OracleType.Number);
                  q.Direction = ParameterDirection.Output;
                  cmd.Parameters.Add(q);
                  //cmd.Parameters[0].OracleType = OracleType.NVarChar;
                  //cmd.Parameters[1].OracleType = OracleType.Number; 
  
                  conn.Open();
                  var obj = cmd.ExecuteNonQuery();
  
                  conn.Close();
                  return (int)q.Value == 1;
              }
  </code></pre>
  
  <p>It returns the following error.
  ORA-06550 wrong number or types of arguments when calling Oracle stored procedure...
  <strong>ANY IDEA?</strong></p>