Forms hanging when trying to commit or update [message #493696] |
Wed, 09 February 2011 07:09 |
|
monkey_suit
Messages: 21 Registered: February 2011
|
Junior Member |
|
|
hi i have form that hangs when when it runs into an update, commit or commit_form. What the form does it displays quantities being distributed to different branches. but if the distribution total quantity doesn't match the total quantity amount available in the warehouse then the user has to readjust the quantities being sent to the branches until the the two total quantities match each other. so when the user clicks the OK button to approve the distribution i had a commit after the begin to commit the changes made in the datablock, it hung there so i added a post-update trigger on the block but then it hung on the update (the form updates the status of the distribution if the totals match). does anyone have an idea of what i might be doing wrong. thanks
|
|
|
|
|
Re: Forms hanging when trying to commit or update [message #493707 is a reply to message #493705] |
Wed, 09 February 2011 07:38 |
cookiemonster
Messages: 13963 Registered: September 2008 Location: Rainy Manchester
|
Senior Member |
|
|
use dbms_monitor to turn on tracing in the session. That'll write a trace file onto the db server.
Assumming that it is a single record update, then the real problem might be the record is locked by another session (forms should protect against that but there are ways). Run the following query while the form is hanging:
select
(select username from v$session where sid=a.sid) blocker,
a.sid,
' is blocking ',
(select username from v$session where sid=b.sid) blockee,
b.sid
from v$lock a, v$lock b
where a.block = 1
and b.request > 0
and a.id1 = b.id1
and a.id2 = b.id2;
|
|
|
|
|
|
Re: Forms hanging when trying to commit or update [message #494069 is a reply to message #493857] |
Fri, 11 February 2011 04:22 |
cookiemonster
Messages: 13963 Registered: September 2008 Location: Rainy Manchester
|
Senior Member |
|
|
cookiemonster wrote on Thu, 10 February 2011 10:03What exactly is the block based on?
You appear to have done something unusual with your datablock setup. I can't really make suggestions for what to check until I understand what you have done.
|
|
|