Home » Developer & Programmer » Forms » How to commit at block level in forms 4.5 ?
How to commit at block level in forms 4.5 ? [message #78337] Fri, 15 February 2002 00:39 Go to next message
CĂ©line
Messages: 1
Registered: February 2002
Junior Member
My form contains 2 blocks that are linked to tables of database. Each block has a save button. When I pressed on one of these buttons, I want that it commits only the data of the block associated to the button. If I use :

go_block('block_name');
commit_form;

all the form is committed. How can I commit at block level ?

Please help me soon!
Thanks !
Re: How to commit at block level in forms 4.5 ? [message #78338 is a reply to message #78337] Fri, 15 February 2002 01:15 Go to previous messageGo to next message
pratap kumar tripathy
Messages: 660
Registered: January 2002
Senior Member
hi,

The commit processing is the process that attempts to make changes permanent to the database , to maintain the integrity of the changes made to the database the Commit process has been maintained for the form level considering as a single transaction.

One way you can achive to commit at the block level is to have all the blocks as control block and handle the transactions in transactional triggers like On-insert , on-update , on-delete which involves lot of coding effort.

if you can avoid the block level commit, then better do it. if u still have problem then feel free to discus.

cheers
pratap
Re: How to commit at block level in forms 4.5 ? [message #126986 is a reply to message #78338] Thu, 07 July 2005 13:58 Go to previous messageGo to next message
preethi_dcf
Messages: 2
Registered: June 2005
Junior Member
Hello Pratap,

This is a followup on the block level commit.I have 4 blocks on my form and I have used ON-INSERT and ON-UPDATE triggers in each of my blocks.
I perform changes on one of the block(actually a CHANGE_LIST_ITEM) and ask for commit but the whole form is commited and redundant information gets committed.
I tried to use
IF :SYSTEM.BLOCK_STATUS = 'CHANGED' IN EACH OF THE BLOCKS
ON-INSERT TRIGGER,
but it appears all the blocks status are set to 'CHANGED', SO IRRESPECTIVE OF THE CHNEGD BLOCK EVERYTHINGH COMMITS
IF I USE
IF :SYSTEM.BLOCK_STATUS = 'NEW'
EVEN THE BLOCK WITH THE NEW VALUES HAS IT'S STATUS SET TO CHANGED SO I CAN'T GET IT TO COMMIT.


COULD YOU PLEASE HELP ME OUT.
THANKS IN ADVANCE.
I WOULD APPRECIATE YOUR RESPONSE.
Re: How to commit at block level in forms 4.5 ? [message #127021 is a reply to message #126986] Thu, 07 July 2005 20:26 Go to previous message
djmartin
Messages: 10181
Registered: March 2005
Location: Surges Bay TAS Australia
Senior Member
Account Moderator
In your test 'see' which 'save' button was pressed before you test whether the block has been changed. ALL the 'on-' triggers will fire on the commit_form so you have to decide which triggers are to do anything, internal to the trigger.

David
Previous Topic: Permissions
Next Topic: problem in opening a new form
Goto Forum:
  


Current Time: Thu Sep 19 22:49:11 CDT 2024