Home » Developer & Programmer » Forms » re : Create item in form dynamically
re : Create item in form dynamically [message #85277] Sun, 13 June 2004 21:18
jhsharma
Messages: 58
Registered: June 2004
Member
DECLARE
   TYPE EmpTabTyp IS TABLE OF lab_mesh_results%ROWTYPE
      INDEX BY BINARY_INTEGER;
   emp_tab EmpTabTyp;
   i BINARY_INTEGER := 0;
   CURSOR c1 IS SELECT * FROM lab_mesh_results
                         where :lab_main_serial = lab_mesh_serial and :lab_main_serial_sub=lab_mesh_serial_sub;

BEGIN
   OPEN c1;
   LOOP
      i := i + 1;
      /* Fetch entire row into record stored by ith element. */
      FETCH c1 INTO emp_tab(i);
      EXIT WHEN c1%NOTFOUND;

        -- process data record
   END LOOP;
   CLOSE c1;
  for i in 1..emp_tab.last loop
        if emp_tab(i).lab_mesh_plus = :a1 and emp_tab(i).lab_mesh_type=:b1 then
        :mesh1 :=emp_tab(i).lab_mesh_mesh;
      end if;
        if emp_tab(i).lab_mesh_plus = :a2 and emp_tab(i).lab_mesh_type=:b2 then
        :mesh2 :=emp_tab(i).lab_mesh_mesh;
      end if;
        if emp_tab(i).lab_mesh_plus = :a3 and emp_tab(i).lab_mesh_type=:b3 then
        :mesh3 :=emp_tab(i).lab_mesh_mesh;
      end if;
       if emp_tab(i).lab_mesh_plus = :a4 and emp_tab(i).lab_mesh_type=:b4 then
            :mesh4 :=emp_tab(i).lab_mesh_mesh;
      end if;
  end loop;

END;
This example only display the items up to mesh4 only while the items can be more even also.

above is the querry which fetched the records. I exactly do not know the no. of rows returned here this may vary . same way i have fetch record from one more table. how do i make it possible to display them on the form
So i want to create items mesh1,mesh2... on depending up the result set of the query
I think it is very clear

oracle 8 with d2k

thanks
Previous Topic: name of coumns & no. of columns
Next Topic: Help for reading and writing image files in developer 2000
Goto Forum:
  


Current Time: Tue May 07 13:10:25 CDT 2024