Home » Developer & Programmer » Forms » Urgent: Committing specific blocks in Forms
Urgent: Committing specific blocks in Forms [message #81694] Wed, 12 March 2003 02:09 Go to next message
sonic
Messages: 11
Registered: March 2003
Junior Member
Hi all,

Can anyone tell me if there's a way to commit data in a specific block. The COMMIT command will not work as it commits data in all the blocks. I've tried changing the status of the record to NEW and QUERY, then reset it to INSERT and CHANGED after I've committed. This works to an extent. If I then try to update the block, I get the "Record changed by another user, Re-query to see changes". Any suggestions ?!?!

Thanx
Sonic
Re: Urgent: Committing specific blocks in Forms [message #81700 is a reply to message #81694] Wed, 12 March 2003 16:29 Go to previous messageGo to next message
magnetic
Messages: 324
Registered: January 2003
Senior Member
add a when button pressed trigger on that block you want to commit,or other proper trigger, with code: commit;
it this wont work then you have to do it the hard way:
again a proper trigger on block level
then the code
insert into table newbies(col1,col2...)
values(:field1,:field2);-- fields of the block you wanna commit
commit;
Re: Urgent: Committing specific blocks in Forms [message #81705 is a reply to message #81694] Thu, 13 March 2003 01:47 Go to previous messageGo to next message
sonic
Messages: 11
Registered: March 2003
Junior Member
Thanx Magnetic but I dont think you understand my problem. When I issue the commit, all the blocks on the form will be committed as well and thats what I DONT want. I only want to commit one block's data leaving the other blocks as they are.
Re: Urgent: Committing specific blocks in Forms [message #84494 is a reply to message #81694] Tue, 23 March 2004 01:24 Go to previous message
B.Srikanth Patnayak
Messages: 6
Registered: November 2002
Junior Member
hey,

you better use autonomous transaction to that block.
It will commit only that block which you want.

in the declare block
pragma autonomous_transaction;
begin
----
---
commit;
end;
Previous Topic: How to make a called form starts executing a query .?
Next Topic: Training in Oracle AS and IDS
Goto Forum:
  


Current Time: Wed Apr 24 15:09:55 CDT 2024