Home » Developer & Programmer » Forms » Forms hanging when trying to commit or update
Forms hanging when trying to commit or update [message #493696] Wed, 09 February 2011 07:09 Go to next message
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 #493699 is a reply to message #493696] Wed, 09 February 2011 07:20 Go to previous messageGo to next message
cookiemonster
Messages: 13938
Registered: September 2008
Location: Rainy Manchester
Senior Member
Trace the database session. See what that is doing if anything.
Re: Forms hanging when trying to commit or update [message #493705 is a reply to message #493699] Wed, 09 February 2011 07:33 Go to previous messageGo to next message
monkey_suit
Messages: 21
Registered: February 2011
Junior Member
Hi cookiemonster i'm using sqldeveloper whose session monitor utility is pretty crappy i can't see anything out of the ordinary the command says UPDATE and session is active it doesn't really provide a lot of detail though. is there anything specific you want me to check.
Re: Forms hanging when trying to commit or update [message #493707 is a reply to message #493705] Wed, 09 February 2011 07:38 Go to previous messageGo to next message
cookiemonster
Messages: 13938
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 #493855 is a reply to message #493707] Thu, 10 February 2011 04:00 Go to previous messageGo to next message
monkey_suit
Messages: 21
Registered: February 2011
Junior Member
i think the problem might be on my blcok because its selecting data from 5 tables and when changes are made to the quantity field i think its trying to update all 5 tables instead of the quantity column that has been changed in the one table. if i select a distribution number from the lov to bring up the block results and totals match already and approve the distribution everything works like it should (ie i have not modified the quantities in the data block). i've set the block property Update Changed Columns Only to yes but that didn't help either.
Re: Forms hanging when trying to commit or update [message #493857 is a reply to message #493855] Thu, 10 February 2011 04:03 Go to previous messageGo to next message
cookiemonster
Messages: 13938
Registered: September 2008
Location: Rainy Manchester
Senior Member
What exactly is the block based on?
What actual update statement is it issuing to the db - you should be able to see that in the session trace file.
Re: Forms hanging when trying to commit or update [message #494065 is a reply to message #493857] Fri, 11 February 2011 03:57 Go to previous messageGo to next message
monkey_suit
Messages: 21
Registered: February 2011
Junior Member
hi cookie monster soory for the late reply, i don't have privileges to view the trace file although my initial suspicions were correct about the block trying to update all the tables in the query data source name. i inserted the name of the table that needs updating in the "DML Data Target Name" and this stopped the hanging. so everything works perfectly (updates the status and commits the change) except it doesn't commit the changes made to quantity field in the data block even though it has commit_form in the code and when i debugged the form it actually does execute the commit_form if changes were made to the form. do you have any idea what might cause the block not to commit its changes.
Re: Forms hanging when trying to commit or update [message #494069 is a reply to message #493857] Fri, 11 February 2011 04:22 Go to previous message
cookiemonster
Messages: 13938
Registered: September 2008
Location: Rainy Manchester
Senior Member
cookiemonster wrote on Thu, 10 February 2011 10:03
What 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.
Previous Topic: Why i'm getting this error? dblink
Next Topic: unexpected error from EXEC_SQL:921ORA-00921:Unexpected end of sql command
Goto Forum:
  


Current Time: Thu Sep 19 13:51:56 CDT 2024