This discussion is archived
3 Replies Latest reply: Apr 30, 2013 9:25 AM by CraigB RSS

FRM-40654 issue - seems Patch problem

412841 Newbie
Currently Being Moderated
Hi,
I am not getting FRM-40654 error in form. I write the steps to reproduce.
Create procedure based block form where we can perform DML in that block.
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.

I have written lock procedure which is working fine.

Forms version 10.1.2.0.2
Database: Oracle Database 10g Enterprise Edition Release 10.2.0.4.0

Thanks to share valuable input!
  • 1. Re: FRM-40654 issue - seems Patch problem
    CraigB Guru
    Currently Being Moderated
    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.

    Craig...
  • 2. Re: FRM-40654 issue - seems Patch problem
    412841 Newbie
    Currently Being Moderated
    Thanks for answer.

    two things:
    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".

    Regards,
  • 3. Re: FRM-40654 issue - seems Patch problem
    CraigB Guru
    Currently Being Moderated
    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.
    Craig...

Legend

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