How do I Rollback Transactions in Forms ?
11888Mar 5 2003 — edited Mar 5 2003Hi everbody,
I'm facing a problem. The problem is as below:
I created procedure (in forms)
procedure update_info
begin
insert into T1;
begin
update table T2;
if sql%rowcount= 0 then
message('could not updated');
raise form_trigger_failure;
end if;
exception
when form_trigger_failure Then
raise form_trigger_failure;
end;
begin
update table T3;
if sql%rowcount= 0 then
message('could not updated');
raise form_trigger_failure;
end if;
exception
when form_trigger_failure Then
raise form_trigger_failure;
end;
End ;--end of proc.
I Called it at Key-Commit
Key-commit
Begin
------stmt1;
-----stmt2;
update_info;
if not form_success then
Raise Form_Trigger_Failure;
End if;
Commit_form;
Exception
when Form_Trigger_Failure then
raise Form_Trigger_Failure;
End;
Now I want that if update at table T2 or T3 fails then it should rollback the entire transaction.
I tried Rollback at various places but it always clears the form but I want the record in form should remain be displayed. and the transaction should be rollback.
Pls help me 'coz I can not do it back-end side.(the restriction).
Thanx in Advance.
Regards.
Suneel