Re: How to change error_level in Forms?

From: Cameron Marshall <cameron_marshall_at_hotmail.com>
Date: 1996/12/16
Message-ID: <32B53321.3AEA_at_hotmail.com>#1/1


It is NOT advisable to code COMMIT's or ROLLBACK's within stored procedures and then call them from Forms.

Forms MUST know when a commit or rollback occurs since this actually puts data in the database and releases locks, etc. It also runs lots of PRE- and POST- triggers and other stuff related to its normal commit processing.

Using stored procedures to commit or rollback is extremely risky and could only really ever be advised if you were to immediately leave the Form.

Also, in the case of rollback you might consider using ROLLBACK_FORM, ROLLBACK_NR, ROLLBACK_RL or ROLLBACK_SV to issue a rollback without clearing the form. It's been a while since I used Forms so I cannot remember what each of these does but I've found one of them quite useful.

Ken Denny wrote:
> The second way I found later and like better is to create a stored procedure
> which does nothing but a commit and call that from within forms.
>
> create or replace
> procedure commit_it is
> begin
> commit;
> end;
> /
>
> Now wherever you have a "commit" in your code change it to "commit_it". By
> putting the commit within a stored procedure forms doesn't know about it. I
> have found this trick to be useful for some other things too. For instance, I
> have a procedure called "roll_it_back" which simply does a rollback. The
> reason I do that is because when you do a rollback within a forms trigger it
> clears the screen and I didn't want that to happen.
Received on Mon Dec 16 1996 - 00:00:00 CET

Original text of this message