Commit_form does not commit [message #535955] |
Sun, 18 December 2011 02:17 ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
![](//www.gravatar.com/avatar/28e04d32fc62c8578df6c2642bd97628?s=64&d=mm&r=g) |
bluetooth420
Messages: 146 Registered: November 2011
|
Senior Member |
|
|
Hi
I am calling a child form from a parent form.
Problem area:
It works perfectly if the parent form is adding records and while entering records when i press the button to call the child form, the whole things work perfectly according to plan.
The problem begins when i run execute query command in the parent form and then call child form then it does not "commit_form". So this is my problem that child form does not work perfectly when parent form is being called in execute_query procedure.
My working:
1) I read in the documentation that
When parent form status is query_only then child will also have the same mode regardless of the parameter given in call_form
So i checked the :SYSTEM.FORM_STATUS of both the parents and child form,it shows "CHANGED" hence this point is covered. (dont know how come the parent form is in changed status but at least it is doing my work)
2) I further read and found that
Commit_form procedure make the :SYSTEM.FORM_STATUS as QUERY. Here i am facing problem as in child form when i make changes
and press commit form. Then before commit_form and after commit_form the :SYSTEM.FORM_STATUS results in "CHANGED".
You can see this in the following code which i have written in save button.
message(:SYSTEM.CURRENT_FORM || ' a ' ||:SYSTEM.FORM_STATUS); pause;
commit_form;
message(:SYSTEM.CURRENT_FORM || ' b ' ||:SYSTEM.FORM_STATUS); pause;
IF Form_Success THEN
Commit;
IF :System.Form_Status <> 'QUERY' THEN
Message('Error prevented Commit');
RAISE Form_Trigger_Failure;
END IF;
else
message('FAIL');
END IF;
exit_form;
then at last exit_form module shows that" i have unsaved data in the form" save Yes-No-Cancel?
Kindly guide me how to track this problem.
Thanks
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|