Oracle - Consultar (Oracle Forms)

 
Vista:

Consultar (Oracle Forms)

Publicado por Anitax (1 intervención) el 11/10/2007 15:37:44
Buenas....
quiero hacer una consulta y mostrar esos datos en un formulario, ya lo hace. pero tengo un problema, donde quiero llenar los datos esta en forma tabular y tiene para mostrar 3 registros a la vez pero solo me muestra 1, ya le coloque el next_item y sigue mostrando 1 solo registro si me pueden ayudar se los agradeceria. el codigo es el siguiente:

PROCEDURE LlenarDetalleEmpleados IS
vNombreDpto departments.department_name%type;
vLocalizacion departments.location_id%type;
vId employees.employee_id%type;
vNombre employees.first_name%type;
vApellido employees.last_name%type;
vFecha employees.hire_date%type;
vCargo employees.job_id%type;
vSalario employees.salary%type;

cursor c_emp is
select employee_id, first_name, last_name, hire_date, job_id, salary
from employees
where department_id = :uno.department_id
order by employee_id;
cursor c_depto is
select department_name, location_id
from departments
where department_id = :uno.department_id;
BEGIN
if :uno.department_id is not null then
open c_depto;
loop
fetch c_depto into vNombreDpto, vLocalizacion;
:uno.department_name := vNombreDpto;
:uno.location_id := vLocalizacion;
exit when c_depto%notfound;
end loop;
close c_depto;
end if;
if :uno.department_id is not null then
open c_emp;
loop
fetch c_emp into vId, vNombre, vApellido, vFecha, vCargo, vSalario;
:uno.employee_id := vId;
:uno.first_name := vNombre;
:uno.last_name := vApellido;
:uno.hire_date := vFecha;
:uno.job_id := vCargo;
:uno.salary := vSalario;
exit when c_emp%notfound;
next_item;
end loop;
close c_emp;
end if;
END;
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

RE:Consultar (Oracle Forms)

Publicado por mad (88 intervenciones) el 11/10/2007 17:16:56
No se si seria mejor con create_record que con next_item.

Prueba,.
Valora esta respuesta
Me gusta: Está respuesta es útil y esta claraNo me gusta: Está respuesta no esta clara o no es útil
0
Comentar