调用 'LJ_TEST' 时参数个数或类型错误
本人属于刚开始学习存储过程的菜鸟一枚,现遇到这个问题解决不了,求大神指教:
我的存储过程是:
create or replace procedure lj_test(inparam in varchar2, outparam out varchar2, inoutparam in out varchar2)
as
varparam varchar2(28);
begin
varparam := inparam;
outparam := varparam || inoutparam;
end;
调用的C#程序是:
conn.Open();
OracleCommand cmd = new OracleCommand("LJ_TEST", conn);
cmd.CommandType = CommandType.StoredProcedure;
OracleParameter[] parameters ={
new OracleParameter("inparam",OracleType.VarChar),
new OracleParameter("outparam",OracleType.VarChar),
new OracleParameter("inoutparam",OracleType.VarChar,28)
};
parameters[0].Value = "dd";
parameters[2].Value ="ff";
parameters[0].Direction = ParameterDirection.Input;
parameters[1].Direction = ParameterDirection.Output;
parameters[2].Direction = ParameterDirection.InputOutput;