.net - SQL0469 IN, OUT, or INOUT not valid for parameter 2 in procedure -
i'm trying run stored procedure against ibm iseries running as400 , getting above error in title.
when type in following execute stored procedure system inavigator tool, runs fine:
call qs36f.hh189p('1','1','')
the first parameter direction defined in stored procedure input, second output, , third output.
problem when try run stored procedure .net code setting parameters. can please me?
my parameter list set follows:
db2command.parameters.add("p_strrrn", idb2dbtype.idb2char, 10); db2command.parameters["p_strrrn"].direction = system.data.parameterdirection.input; db2command.parameters["p_strrrn"].value = strrrn; db2command.parameters.add("p_lstrrn", idb2dbtype.idb2char, 10); db2command.parameters["p_lstrrn"].value = string.empty; db2command.parameters["p_lstrrn"].direction = system.data.parameterdirection.output; db2command.parameters.add("p_errmsg", idb2dbtype.idb2char, 70); db2command.parameters["p_errmsg"].value = string.empty; db2command.parameters["p_errmsg"].direction = system.data.parameterdirection.output;
resolution
had declare commandtext following:
string cmdtextstring = "call qs36f.hh189p" + "('" + strrrn + "',?,?)";
had set parameters following:
db2command.parameters.add("p_lstrrn", idb2dbtype.idb2char, 10); db2command.parameters["p_lstrrn"].value = string.empty; db2command.parameters["p_lstrrn"].direction = system.data.parameterdirection.output; db2command.parameters.add("p_errmsg", idb2dbtype.idb2char, 70); db2command.parameters["p_errmsg"].value = string.empty;
if passing parms string constants, out or inout value returned to? db2 expecting call procedure in way can return values variables.
Comments
Post a Comment