Home » Developer & Programmer » Forms » To open a Cursor in Forms 9i (front end)
To open a Cursor in Forms 9i (front end) [message #86527] Fri, 08 October 2004 00:53 Go to next message
AB
Messages: 41
Registered: July 2002
Member
Hi,

 I have two cursors. The second cursor I need to open based on the value of the first cursor. From the first cursor i fetch all the Table names (stored in one of the table). The second cursor will be opened based on the Table name from the first cursor. (IN the second cursor using the Table name i want to retrieve certain records from the table name fetched from first cursor)

All these i want to do in the front end (Forms 9i) since I have to do some OLE process also using these cursors and Forms do not allow to use Dynamic Cursors.

Can anyone pls help how to achive this?

Thanks and Regards

AB
Re: To open a Cursor in Forms 9i (front end) [message #86531 is a reply to message #86527] Fri, 08 October 2004 03:55 Go to previous messageGo to next message
Ani
Messages: 56
Registered: November 2000
Member
Hi,
Pls try the below:Just an example of how to use.
declare
cursor c1 is
select table_name from table_1;
cursor c2(v_table_name varchar2) is
select * from table_2 where
table_name = v_table_name;
begin
for i in c1 loop
for j in c2(i.table_name) loop
conditions....
end loop;--cursor c2
end loop;--cursor c1
end;

All the best.
Ani
Re: To open a Cursor in Forms 9i (front end) [message #86538 is a reply to message #86531] Fri, 08 October 2004 06:52 Go to previous messageGo to next message
AB
Messages: 41
Registered: July 2002
Member
Hi Ani,
Its not like that. just see below
DECLARE
Cursor c1 is select Table_name from t1;
cursor c2(lv_tab_name varchar2) is select * from :tab_name;
BEGIN
FOR i In C1 loop
FOR j IN c2(i.Table_name) LOOP
-- Here I want to select fields from table name wheich is retrieved from 1st cursor like..
Select * from i.Table_name; -- THis is ideally not allowed. This is part of Dynamic SQL which is not allowed in front end but can be done only thr' backend.

END LOOP

END LOOP;

END;

so any other way to achieeve this

Thanks
AB
Re: To open a Cursor in Forms 9i (front end) [message #86557 is a reply to message #86538] Mon, 11 October 2004 00:31 Go to previous message
Ani
Messages: 56
Registered: November 2000
Member
Hi,
using the above concept try using copy and namein functions that will return values dynamically to front end.

Ani
Previous Topic: multithreading in oracle forms 6i
Next Topic: Who Dares To Give the Solution
Goto Forum:
  


Current Time: Sun Sep 15 23:43:47 CDT 2024