FRM-40737 what i can do .. ?? [message #442399] |
Sun, 07 February 2010 13:43 ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
ahmed_samir
Messages: 61 Registered: January 2009 Location: EGYPT
|
Member |
|
|
hi there
i want to use cursor to get data from db to "control block "(db item =no ) this data had where clause depend on item on other block
this my code :
declare
cursor get_sol is
select SOL_STEP,PROB_ID
from MI_SOLUTION
where PROB_ID=:MI_FORM_PROB.PROB_ID;
begin
go_block('control');
open get_sol;
loop
fetch get_sol into :CONTROL.txt_sol_step, :CONTROL.TXT_BROB_ID;
next_record;
exit when get_sol%notfound;
end loop;
go_block('MI_FORM_PROB');
end ;
when am using when_validate_item trigger error raise :
FRM-40737:Illegal restricted procedure next_record in when_validate_item
that's the trigger ???? or how to solve ??
in case of execute query in what trigger i will write the same code to get data in case of execute query by user ..
-
Attachment: err.GIF
(Size: 13.08KB, Downloaded 929 times)
|
|
|
|
|
Re: FRM-40737 what i can do .. ?? [message #442403 is a reply to message #442399] |
Sun, 07 February 2010 15:58 ![Go to previous message Go to previous message](/forum/theme/orafaq/images/up.png) ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
ahmed_samir
Messages: 61 Registered: January 2009 Location: EGYPT
|
Member |
|
|
dear Littlefoot
thanks 4 your help ..
am try what u say .. and made trigger KEY-EXEQRY and write inside it the same good above .. but am trying to but this trigger in different levels ( form - block ) but the problem is error raise that
frm40202 field must be entered
what the idea .. ??
thanks 4 your . help
|
|
|
|
Re: FRM-40737 what i can do .. ?? [message #442641 is a reply to message #442399] |
Tue, 09 February 2010 12:03 ![Go to previous message Go to previous message](/forum/theme/orafaq/images/up.png) ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
ahmed_samir
Messages: 61 Registered: January 2009 Location: EGYPT
|
Member |
|
|
dear .. athar.fitfd
i use button .. it's ok .. thanks ..
but when i try to execute query using execute key not work ( no data retrieve from database to the control block )
what's trigger .. ot how to solve
thanks
|
|
|
|
Re: FRM-40737 what i can do .. ?? [message #442661 is a reply to message #442399] |
Tue, 09 February 2010 15:40 ![Go to previous message Go to previous message](/forum/theme/orafaq/images/up.png) ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
ahmed_samir
Messages: 61 Registered: January 2009 Location: EGYPT
|
Member |
|
|
no ..
but the idea i but this code in key_execture trigger :
declare
cursor get_sol is
select SOL_STEP,PROB_ID
from MI_SOLUTION
where PROB_ID=:MI_FORM_PROB.PROB_ID;
begin
--go_block('control');
execute_query;
open get_sol;
loop
fetch get_sol into :CONTROL.txt_sol_step, :CONTROL.TXT_BROB_ID;
next_record;
exit when get_sol%notfound;
end loop;
--go_block('MI_FORM_PROB');
end ;
but the problem is the data shown in the first record in the control block only ... and the idea of next_record to worked
thank
|
|
|
Re: FRM-40737 what i can do .. ?? [message #442674 is a reply to message #442661] |
Tue, 09 February 2010 22:42 ![Go to previous message Go to previous message](/forum/theme/orafaq/images/up.png) ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
tamzidulamin
Messages: 132 Registered: October 2009 Location: Dhaka
|
Senior Member |
|
|
dear,
Quote:
Make Sure your Control Block is Multi Record Block
Change CONTROL block properties
"Number of Records Displayed"
value must be greater than 1
Try the following code:
(You must have knowledge about triggring scope,that means where you write your trigger).
Begin
go_block('control');
For i in (select SOL_STEP,PROB_ID
from MI_SOLUTION
where PROB_ID=:MI_FORM_PROB.PROB_ID)
Loop
:CONTROL.txt_sol_step := i.SOL_STEP;
:CONTROL.TXT_BROB_ID := i.PROB_ID ;
next_record;
End Loop;
End ;
Regrads,
Tamzidul Amin.
|
|
|
Re: FRM-40737 what i can do .. ?? [message #443029 is a reply to message #442399] |
Fri, 12 February 2010 02:49 ![Go to previous message Go to previous message](/forum/theme/orafaq/images/up.png) |
ahmed_samir
Messages: 61 Registered: January 2009 Location: EGYPT
|
Member |
|
|
dear tamzidulamin
thanks for your code it's work that's good ..but there two things want ::
1- do u have any paper or book to know the scopes of the triggers
2- i want to add data in the control block depend on each record in the data block mean that .. with the new record write in the control ..
thanks
|
|
|