title: Enterprise Library ODP.NET call returns ORA-06502: PL/SQL: numeric or value error
body: <p>I have the following Oracle Stored Procedure:</p>
  
  <pre><code>PROCEDURE SP_ITEMEXISTS(pID IN NUMBER, pExists OUT CHAR) IS
  BEGIN
          select CASE count(*) WHEN 0 THEN 'N' ELSE 'Y' END into pExists from items where id = pID;
  END SP_ITEMEXISTS;
  </code></pre>
  
  <p>I'm calling it from Enterprise Library 6.0 with ODP.NET with the following code:</p>
  
  <pre><code>public bool ItemExists(int itemID)
  {
      string procedureName = "SP_ItemExists";
      var database = new DatabaseProviderFactory().CreateDefault();
      bool returnValue = false;
  
      using (OracleCommand command = (OracleCommand)database.GetStoredProcCommand(procedureName))
          {
              command.Parameters.Add("pID", OracleDbType.Int32, itemID, ParameterDirection.Input);
              OracleParameter pExists = command.Parameters.Add("pExists", OracleDbType.Char, ParameterDirection.Output);
  
              database.ExecuteNonQuery(command);
  
              if (pExists.Value.ToString().ToUpper() == "Y")
                  returnValue = true;
              else
                  returnValue = false;
          }
  
      return returnValue;
  
  }
  </code></pre>
  
  <p>I receive the following error:
  ORA-06502: PL/SQL: numeric or value error</p>
  
  <p>Calling the Stored Procedure from Oracle SQL Developer works.</p>