title: how to define Output parameter as character string for Oracle procedure in c#?
body: <p>Here is the simple stored procedure that returns a character string literal</p>
  
  <pre><code>PROCEDURE getUserValidateProfileValue (      
    outParam1 OUT VARCHAR2)
  AS
  BEGIN  
      SELECT 'testABC' into outParam1 from dual;
  END getUserValidateProfileValue;
  </code></pre>
  
  <p>this runs OK in Toad.  And following is how I call it from my C# app (note: I have several other procedures that get called using same connection, etc, which all work fine)</p>
  
  <pre><code>...
  using (OracleCommand command = DaoHelper.GetOracleBoundByNameStoredProcedureCommand(conn, schema, pkg, "getUserValidateProfileValue"))
  {
     command.Parameters.Add("outParam1", OracleDbType.Varchar2, 2000, ParameterDirection.Output);
     command.ExecuteNonQuery(); &lt;&lt;&lt;---bombs out here
     s1 = command.Parameters["outParam1"].Value.ToString();
  }
  </code></pre>
  
  <p>this bombs out at "command.ExecuteNonQuery();" </p>
  
  <p>how to retrieve this output?</p>