Solved

How to distinguish post and commit_form

Posted on 1998-10-14
7
1,270 Views
Last Modified: 2008-03-17
In one when-button-pressed event I am calling "post". Afterwards I want to know whether the "commit" is encountered or still it is in post. How can distinguish post and commit programmatically. Since in both the cases the system status is QUERY.
0
Comment
Question by:santhoshn
  • 4
  • 2
7 Comments
 

Author Comment

by:santhoshn
Comment Utility
Edited text of question
0
 

Author Comment

by:santhoshn
Comment Utility
Edited text of question
0
 
LVL 1

Expert Comment

by:petevdb
Comment Utility
You talk about the record status here.
I think the form status is still 'CHANGED' when you posted but not committed. (But I must say I'm not sure).

You can also use a global variable that sets to 'POSTED' if you use the post built-in and sets to 'COMMITTED' when you use the commit built-in. The global variable is best set to 'NOTPOSTED' in the WHEN-NEW-ITEM-INSTANCE trigger on FORM-level when the form status changes to 'CHANGED'.

Peter.
0
PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

 

Author Comment

by:santhoshn
Comment Utility
Hi Peter

Thank you for responding my question.

But actually after "POST" all the system status including form status is "QUERY" only.
Now I am using global variable only. This gives me lot of maintenance problems. I will give you a brief of my problem.

In my form there are three blocks are there. One is master another is detail and one is
independent block. Here I will select what are rows I want using check box(Multi select) from the independent block and move all the selected rows to the detail block by pressing a button . While moving I am giving one "POST". Now when I navigate to next record of the master block. This time I want to ask the alert "Do you want to save the changes". Since I gave the POST the default alert won't come. So explicitly I need to show the alert. If the user pressed the COMMIT then it should not ask. This is my requirement.

If know any less maintainence logic please let me know.

Thanks

Santhosh.

0
 

Accepted Solution

by:
dmcgregor earned 100 total points
Comment Utility
Create a control block with one item -- a flag.  [The flag may also be included in the
independent block.]  Set the flag to "No" whenever you do a POST.
The real key to making this work is the form-level trigger WHEN-DATABASE-COMMIT.
This trigger will fire *only* after the data is committed to the DB;  it will *not* fire after
the POST command.  In that trigger, set the flag I mentioned above to "Yes".
Now, whenever you move between master records, just check the flag.  If it is "No",
then the DB commit has not occurred; if it is "Yes", it has.  [You may also need to give
it a third value if you are likely to check *before* the POST occurs.]
Note that this will work for Oracle Forms 4.5 (Developer/2000 1.3.2).  Check your docs
if you have a more recent version, such as Forms 5.0 (Dev/2000 v. 2.0).

0
 
LVL 1

Expert Comment

by:petevdb
Comment Utility
Why do u post after moving the records from the independent block to the detail block ?
If u insert the records in the table without committing, the form will ask if u want to commit if the user jumps to another master record. It will also show the not-committed details if u query the detail block.
Just an idea. The solution from dmcgregor looks also right.
Peter.
0
 

Author Comment

by:santhoshn
Comment Utility
Hi dmcgregor

Thank you very much for your answer and is working fine.

Santhosh
0

Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Join & Write a Comment

Introduction A previously published article on Experts Exchange ("Joins in Oracle", http://www.experts-exchange.com/Database/Oracle/A_8249-Joins-in-Oracle.html) makes a statement about "Oracle proprietary" joins and mixes the join syntax with gen…
Cursors in Oracle: A cursor is used to process individual rows returned by database system for a query. In oracle every SQL statement executed by the oracle server has a private area. This area contains information about the SQL statement and the…
This video shows how to copy a database user from one database to another user DBMS_METADATA.  It also shows how to copy a user's permissions and discusses password hash differences between Oracle 10g and 11g.
This video shows syntax for various backup options while discussing how the different basic backup types work.  It explains how to take full backups, incremental level 0 backups, incremental level 1 backups in both differential and cumulative mode a…

744 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

9 Experts available now in Live!

Get 1:1 Help Now