调用
conn.Open();
OracleCommand cmd = new OracleCommand();
cmd.CommandType = CommandType.StoredProcedure;//设置cmd的类型为存储过程
cmd.CommandText = "EMP_COUNT";
OracleParameter param = new OracleParameter("paraminout", OracleType.VarChar, 20);
param.Direction = ParameterDirection.InputOutput;
cmd.Connection = conn;
cmd.Parameters.Add(param);
cmd.ExecuteNonQuery();
MessageBox.Show("Get PROCEDURE return:".ToLower() + param.Value.ToString());
  存储过程
create or replace PROCEDURE       EMP_COUNT(paraminout in out varchar2)
AS
V_TOTAL NUMBER(10);
BEGIN
SELECT COUNT(*) INTO V_TOTAL FROM EMP;
paraminout := V_TOTAL;
DBMS_OUTPUT.PUT_LINE(V_TOTAL);
END;