Hello.
I have a problem trying solving this error, in a package. If anyone could help me. (i readed in gogole this error is caused if the colection is not inicitalized, but i am using a constructor and i am getting the same error).
My code:
In my package-specification:
TYPE ECO_CLIENTES_REG IS RECORD (
VARCHAR2(10) not null :=' ',
VARCHAR2(100) not null:= ' ',
VARCHAR2(10)not null := ' ');
TYPE mi_reg2 is table of ECO_CLIENTES_REG;
DATOS2 mi_reg2 := mi_reg2(); /*constructor, inicialiting the collection trying evade the error. Without Success */
My package-body:
CARGAR_ECO_CLIENTES (P_CLIENTE IN OUT mi_reg2) IS
cursor mi_cli is SELECT NIF, NOMBRE, CODIGO_POSTAL
FROM ECO_CLIENTES
ORDER BY NIF DESC;
i number :=1;
BEGIN
open mi_cli;
loop
fetch mi_cli into P_CLIENTE(i).nif, P_CLIENTE(i).nombre, P_CLIENTE(i).codigo_postal;
exit when mi_cli%notfound;
i : i +1;
end loop;
close mi_clie;
-------
When i debug my package. when the debug-pointer execute the "fetch", the pointer go inmediatily to the EXCEPTION zone, showing this error:
ORA-06531.
If anyone could help me.
Thanks