Re: :system.Form_Status and commit - Forms 5.0.6.8.0

From: Martin Cookson <martin.cookson_at_dial.pipex.com>
Date: Sat, 20 Mar 1999 01:58:01 -0000
Message-ID: <7cuvd5$cre$1_at_plug.news.pipex.net>


I think the problem may be due to the fact that you've only established a single session with the database. When you open an Oracle MDI window, by default, Forms establishes a single connection or session with the database. Whenever forms issues a commit ALL transactions in the current RUNFORM session are committed to the database. So, if you have two forms open and you insert a record in both forms and then issue a commit from one of them, records inserted through both forms will be committed. To get round this problem, you will need to open each form in a different session, using the OPEN_FORM built in procedure with the session mode parameter set to SESSION eg

OPEN_FORM('FRED',ACTIVATE,SESSION) Try reading Chapter 5 of the Oracle Advanced Forms Techniques Manual.

You will also need to execute RUNFORM with the session option set to ON eg

F45RUN module=myform userid=scott/tiger session=YES

Of course I may have mis-understood you're question in which case this won't work either :).

Martin Cookson
Jim wrote in message ...
>Easy Question,
>
>I check if :system.Form_Status = 'CHANGED' to turn on my 'SAVE' Button
>
>My 'SAVE' Button is really simple, just a commit statement.
>
>I have two editing forms in a MDI environment.
>
>I open FORM 'A' and make some changes, this activates my SAVE Button on
Form
>'A'
>
>Leaving FORM 'A' Open, I Open FORM 'B' and make some changes, this
activates
>the 'SAVE' Button on FORM 'B'.
>
>When you Press the 'SAVE' button on FORM 'B' it commits all the changes,
>from both forms!
>
>Maybe what I'm trying to is poor design but is there any way to make sure
>that the 'SAVE' Button on a Form ONLY saves the changes for that form?
>
>Thanks in Advance
>
>Jim
>
>
Received on Sat Mar 20 1999 - 02:58:01 CET

Original text of this message