C sharp - URGENTE AUXILIOError C# con procedimiento oracle10

   
Vista:

URGENTE AUXILIOError C# con procedimiento oracle10

Publicado por STELLA (2 intervenciones) el 03/03/2011 14:25:12
Me sale el siguiente error: ORA-06550: line 1, column 7:
PLS-00306: wrong number or types of arguments in call to 'HONORARIONOC'
ORA-06550: line 1, column 7:
PL/SQL: Statement ignored; cuando en c# llamo un procedimiento almacenado de Oracle.

mi codigo en C# es:

cmdo = cnno.CreateCommand();
cmdo.CommandText = strSQL;
cmdo.CommandType = CommandType.StoredProcedure;
this.setParametrosOracle(cmdo, getParamertosOracle(NombreParametros, ValoresParametros));
OracleDataAdapter da = new OracleDataAdapter(cmdo);
da.Fill(ds);

DONDE EN:
NombreParametros("In_TipoHonorario","In_FechaIni", "In_FechaFin")
ValoresParametros("HM","2011/02/01","2011/02/28")

Y MI PROCEDIMIENTO EN ORACLE ES:

CREATE OR REPLACE PACKAGE ADMSALUD.HonorarioNoc_PKG AS

TYPE mes_arr IS TABLE OF VARchar2(10)
INDEX BY BINARY_INTEGER;
TYPE NOrden_arr IS TABLE OF VARCHAR2(10)
INDEX BY BINARY_INTEGER;
TYPE FecCirugia_arr IS TABLE OF varchar2(10)
INDEX BY BINARY_INTEGER;
TYPE HoraCirugia_arr IS TABLE OF VARCHAR2(5)
INDEX BY BINARY_INTEGER;
TYPE IdPaciente_arr IS TABLE OF VARCHAR2(13)
INDEX BY BINARY_INTEGER;
TYPE Paciente_arr IS TABLE OF VARCHAR2(83)
INDEX BY BINARY_INTEGER;
TYPE IdCirugia_arr IS TABLE OF VARCHAR2(13)
INDEX BY BINARY_INTEGER;
TYPE Cirujano_arr IS TABLE OF VARCHAR2(83)
INDEX BY BINARY_INTEGER;
TYPE CodPresta_arr IS TABLE OF VARCHAR2(8)
INDEX BY BINARY_INTEGER;
TYPE NPrestacion_arr IS TABLE OF VARCHAR2(255)
INDEX BY BINARY_INTEGER;
TYPE PHonorario_arr IS TABLE OF VARCHAR2(7)
INDEX BY BINARY_INTEGER;
TYPE Monto_arr IS TABLE OF varchar2(14)
INDEX BY BINARY_INTEGER;
TYPE Sociedad_arr IS TABLE OF VARCHAR2(4)
INDEX BY BINARY_INTEGER;
TYPE HoraIni_arr IS TABLE OF VARCHAR2(5)
INDEX BY BINARY_INTEGER;
TYPE HoraFin_arr IS TABLE OF VARCHAR2(2)
INDEX BY BINARY_INTEGER;
TYPE HoraCompFin_arr IS TABLE OF VARCHAR2(5)
INDEX BY BINARY_INTEGER;
TYPE Servicio_arr IS TABLE OF VARCHAR2(8)
INDEX BY BINARY_INTEGER;

PROCEDURE HonorarioNoc(
In_TipoHonorario IN VARCHAR2,
In_FechaIni IN VARCHAR2,
In_FechaFin IN VARCHAR2,
mes OUT mes_arr,
norden OUT norden_arr,
feccirugia OUT feccirugia_arr,
horacirugia OUT horacirugia_arr,
idpaciente OUT idpaciente_arr,
paciente OUT paciente_arr,
idcirugia OUT idcirugia_arr,
cirujano OUT cirujano_arr,
codpresta OUT codpresta_arr,
nprestacion OUT nprestacion_arr,
phonorario OUT phonorario_arr,
monto OUT monto_arr,
sociedad OUT sociedad_arr,
horaini OUT horaini_arr,
horafin OUT horafin_arr,
horacompfin OUT horacompfin_arr,
servicio OUT servicio_arr,
srv_message OUT VARCHAR2
)
AS
srv_fetchstatus NUMBER (1);
srv_totalrows NUMBER (8);
srv_rowcount NUMBER (8);


CURSOR regrecursor
IS
SELECT nombremes (EXTRACT (MONTH FROM a.fecqrf)) AS mes,
a.ordnumero AS norden, a.fecqrf AS feccirugia,
a.horqrf AS horacirugia, e.pac_pac_rut AS idpaciente,
RTRIM (e.pac_pac_apellpater)
|| ' '
|| RTRIM (e.pac_pac_apellmater)
|| ' '
|| RTRIM (e.pac_pac_nombre) AS paciente,
b.anesid AS idcirugia,
RTRIM (f.ser_pro_apellpater)
|| ' '
|| RTRIM (f.ser_pro_apellmater)
|| ' '
|| RTRIM (f.ser_pro_nombres) AS cirujano,
c.pre_pre_codigo AS codpresta,
h.pre_pre_descripcio AS nprestacion,
c.porhonpor AS phonorario, c.ate_pre_montopagar AS monto,
c.soccod AS sociedad, d.horaini AS horaini,
SUBSTR (d.horafin, 1, 2) AS horafin,
d.horafin AS horacompfin, a.ser_obj_codigo AS servicio
FROM tabprgqrf a,
tabprdrel b,
tabprdreldet c,
taborddetcir d,
pac_paciente e,
ser_profesiona f,
pre_prestacion h,
ate_prestacion k
WHERE a.ordnumero = b.ordnumero
AND a.ordnumero = c.ordnumero
AND b.ordnumero = k.ordnumero
AND b.pre_pre_codigo = k.ate_pre_codigo
AND c.cnpqrgcod = in_tipohonorario
AND b.pre_pre_codigo = c.pre_pre_codigo
AND a.ordnumero = d.ordnumero
AND a.pac_pac_numero = e.pac_pac_numero
AND b.ser_pro_rut = f.ser_pro_rut
AND h.pre_pre_codigo = c.pre_pre_codigo
AND TRUNC (a.fecqrf) BETWEEN TO_DATE (In_FechaIni, 'yyyy/mm/dd')
AND TO_DATE ('In_FechaFin', 'yyyy/mm/dd')
AND ( d.horaini BETWEEN ('19:00') AND ('23:59')
OR d.horaini BETWEEN ('00:00') AND ('05:59')
)
AND ( d.horafin BETWEEN ('19:00') AND ('23:59')
OR d.horafin BETWEEN ('00:00') AND ('05:59')
);
BEGIN
srv_totalrows := TO_NUMBER (RTRIM (srv_message));
srv_rowcount := 0;
srv_fetchstatus := 0;
srv_message := '1000000';

/*-----------------------------------------------------------------*/
/*------------------------ Begin User Code ------------------------*/
/*-----------------------------------------------------------------*/
BEGIN
IF NOT regrecursor%ISOPEN
THEN
OPEN regrecursor;
END IF;



LOOP

FETCH regrecursor
INTO mes (srv_rowcount + 1),
norden (srv_rowcount + 1),
feccirugia (srv_rowcount + 1),
horacirugia (srv_rowcount + 1),
idpaciente (srv_rowcount + 1),
paciente (srv_rowcount + 1),
idcirugia (srv_rowcount + 1),
cirujano (srv_rowcount + 1),
codpresta (srv_rowcount + 1),
nprestacion (srv_rowcount + 1),
phonorario (srv_rowcount + 1),
monto (srv_rowcount + 1),
sociedad (srv_rowcount + 1),
horaini (srv_rowcount + 1),
horafin (srv_rowcount + 1),
horacompfin (srv_rowcount + 1),
servicio (srv_rowcount + 1);



exit when regrecursor%notfound;

/* IF regrecursor%NOTFOUND
THEN
CLOSE regrecursor;

EXIT;
END IF;*/

srv_rowcount := srv_rowcount + 1;
srv_fetchstatus := 1;
END LOOP;

IF regrecursor%ISOPEN
THEN
CLOSE regrecursor;
END IF;

IF srv_rowcount > 0
THEN
srv_message :=
SUBSTR (srv_message, 1, 6) || '1'
|| SUBSTR (srv_message, 8);
END IF;
EXCEPTION
WHEN OTHERS
THEN
srv_message :=
SUBSTR (srv_message, 1, 1)
|| '38000'
|| srv_fetchstatus
|| 'Se produjo un ERROR';
END;

/*------------------------- End User Code -------------------------*/
/*-----------------------------------------------------------------*/
<<lespder_exit>>
NULL;


END HonorarioNoc;
end HonorarioNoc_PKG;
/

ALGUIEN SABE PORQUE ME SALE ESE ERROR?????????
GRACIAS.
Valora esta pregunta
Me gusta: Está pregunta es útil y esta claraNo me gusta: Está pregunta no esta clara o no es útil
0
Responder