This content has been marked as final. Show 3 replies
Now open two sessions, query the same data in both sessions. In session A, update a record and save the data.Now go to session B (we can see old data in screen), update the same record which we have updated in session A, record is updated successfully.>
What were you expecting to happen? You query a record into a Form in session A and then update and commit the update. In session B you have the same record displayed. How is Forms suppose to know that the record was updated in Session A?
I have written lock procedure which is working fine.The lock appears to be doing it's job. The record in Session A is locked for the duration of the update and then the lock is released. If you were to attempt to modify the record in Session B before you commit changes in Session A then you should see a Lock related error, but since the update in session A has been commited, session B has no way of knowing the record was updated since the time it was fetched so it displays the FRM-40654 - Record updated by another user error. This is expected.
Thanks for answer.
First, This form behaviour is not good. Second, please advice me if need to raise SR.
I expect oracle form should throw error: FRM- 40654.
I want to know how form gives error in below scenario: (How oracle forms identify that data is changed after last query)
Create table based block form, open two session, query the same data. Update data in Session A and commit the data.
In session B (we can see old data), try to update the same record, we get error FRM-40654.
So the important thing is "in table based block, form recognizes that data is changed after query, but in procedure based block, its not working".
So the important thing is "in table based block, form recognizes that data is changed after query, but in procedure based block, its not working".Again, this is expected behavior because when a data block is based on a procedure, you are overriding the standard Forms interaction with the table. Therefore, the only time the procedure based block will know there have been updates to the underlying data is when you attempt to write changes using your update procedure listed in the Block's On-Update trigger.
Blocks based on a Procedure is way to display data in your form when your data is arranged in more than one table making basing the block on the table impossible. However, if your table joins are not too complex, you could try basing your block on the tables using a join. For information on how to do this, take a look at the following: Oracle White Paper – Basing a data block on a join
Hope this helps.