This discussion is archived
1 Reply Latest reply: Oct 20, 2013 7:05 PM by PegYang RSS

Record was updated in the form not based on the currect status in the database

PegYang Newbie
Currently Being Moderated

Hello,

 

I've got a very strange problem about the form. The user executed query in a form but didn't do any changes and left it open. Then he opened another form (in another session) and started to run a package which would update some columns of the same table. The package was executed successfully and the changes were committed. After that, the user came back to the previous form and updated some record.

 

Generally, this operation would not succeed, and we will get "FRM-40654 Record Updated by another user" because those records the user wanted to update had been updated by the package. Also I did a test for this and it proved the same. However, this time it seemed the user successfully committed the change in the form which was not expected.

 

There's a trigger (before update or delete) on this table. The trigger records the old value for each column in a journal table (with modification date recorded). From the records in journal table (order by modifcation date), I can see the record was really updated after the package updated it. And comparing the new values and old values, I found many columns were updated in one time violating the business process (I mean no program or form would do such change on this table).

I guess this update was probably based on an old status of the record, but not on the current one. The only reasonable OLD status from my journal table was recorded several hours before this one, and between these 2 time points, there're many lines recording the changes done by the package.

 

I know that even only one column's value is changed in the form, oracle form would still generate the update statement setting ALL updatable columns. I consider this could be the reason why the record was updated based on an old status. But I don't understand why the error FRM-40654 didn't show up and stop the user's update.

 

Is there anyone who has got similar experience before?

 

Thank you.

 

Regards,

Peg

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points