Home » Developer & Programmer » Forms » two blocks with same table not in sync (forms 10g)
two blocks with same table not in sync [message #411792] Mon, 06 July 2009 14:54 Go to next message
nastyjillu
Messages: 211
Registered: February 2009
Senior Member
Hi,
i have 2 blocks. block_A and block_B.

both are based on same table.

if i open block_B and insert record and then if i go to block_A i want to see that record in block_A.

i think before going to block_A, i need to commit as the table is ready with the data to display in block_A.

and i have to execute block_A before i go to block_A.
but i am not able to findout in which trigger i need to commit and in which trigger i need to execute block_A.

i cannot write commit in post-insert
and cannot write go_block ( to execute qry) in post,on triggers.

thats making me difficult
Re: two blocks with same table not in sync [message #411913 is a reply to message #411792] Tue, 07 July 2009 05:18 Go to previous messageGo to next message
cookiemonster
Messages: 13938
Registered: September 2008
Location: Rainy Manchester
Senior Member
You don't need to commit the data, just post it. Since the blocks are in the same form you'll be using the same session.
Commit is only needed to make the data visible to other sessions.
Try when-new-block-instance or possibly when-new-record-instance for requerying the other block but it's going to be awkward.
I'd just avoid having two blocks for the same data personally.
Re: two blocks with same table not in sync [message #412084 is a reply to message #411913] Tue, 07 July 2009 12:49 Go to previous messageGo to next message
nastyjillu
Messages: 211
Registered: February 2009
Senior Member
in block_B, there is a close button. that button takes us to block_A.

in that button iam commiting if there is change in form status and commiting.
then go_block(block_A);
execute_query;


this works for me.

is there any other better way??
Re: two blocks with same table not in sync [message #412096 is a reply to message #412084] Tue, 07 July 2009 15:25 Go to previous messageGo to next message
Littlefoot
Messages: 21818
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
What is the purpose of 2 blocks based on a same table, in a single form?
Re: two blocks with same table not in sync [message #412340 is a reply to message #412096] Wed, 08 July 2009 15:13 Go to previous messageGo to next message
nastyjillu
Messages: 211
Registered: February 2009
Senior Member
block_A is on main page. its at the bottom and displays few records. when we open block_B by clicking some button, block_B opens and it has many records displayed at a time.
Re: two blocks with same table not in sync [message #412868 is a reply to message #412340] Mon, 13 July 2009 02:34 Go to previous message
djmartin
Messages: 10181
Registered: March 2005
Location: Surges Bay TAS Australia
Senior Member
Account Moderator
Have you solved your problem?

David
Previous Topic: Track Form executions
Next Topic: Can not create group
Goto Forum:
  


Current Time: Fri Sep 20 10:49:38 CDT 2024