I assume that when adding named parameters using DbParameterBuilder the order of parameters should not matter. But i have a problem using the following procedure:
PROCEDURE ConsultarProcesos(pCanal IN varchar2, pRegistros OUT SYS_REFCURSOR, pUsuarioId in varchar2 := '-')
if i consume the procedure adding the parameters in the same order as the procedure it works, like this way:
parameters => { parameters.Add("pCanal", pCanal); parameters.AddRefCursor("pRegistros"); parameters.Add("pUsuarioId", pUsuarioId); }
But, if i change the order procedure throws the following error:
ORA-06550: line 1, column 7:
PLS-00306: wrong number or types of arguments in call to 'CONSULTARPROCESOS'
ORA-06550: line 1, column 7
I think that when working with named parameters the addition order should not matter as they are added using their parameterName property.