This discussion is archived
4 Replies Latest reply: Apr 26, 2013 3:52 AM by Bhushan53 RSS

FRM - 40654 Record has been updated by another user. Requery the record to

951614 Newbie
Currently Being Moderated
Hi,

Scenario

------------
Header Block - H1
Multi record Child Block - C1
----------------
Updating a field - exchange rate in the header block - should change two fields - "price and amount" in the multi record child block - C1.
There are no database triggers on any tables.
We have handled the above logic in the post -update trigger of H1.

Explicit update statemetns are again given in the post-update trigger whose purpose is to update the table of the child block's - price and amount columns.

-------------------
Question
Is it correct to use an update statement in the post update trigger oto update the table of teh child block . If not , wheat is the correct way ?
We are also updating a summary column called "sum_amount" that belongs to H1.
-----------------------
We are getting the error -
-------------
FRM - 40654 Record has been updated by another user. Requery the record to see the change"
-----------------

Any updates on this would be helpful. We have gone thru the suggestions in this forum.....and were not able to fix this issue...
Regards
SR
  • 1. Re: FRM - 40654 Record has been updated by another user. Requery the record to
    CraigB Guru
    Currently Being Moderated
    Updating a field - exchange rate in the header block - should change two fields - "price and amount" in the multi record child block - C1.
    There are no database triggers on any tables.
    We have handled the above logic in the post -update trigger of H1. >
    First, I would confirm that the logic in your Post-Update trigger of Block H1 is the cause of the error. You can do this either by deleting the trigger or by commenting out the code and only execute "NULL;". If you still get the FRM-40654 error then the Post-Update was not the problem and you still have code somewhere else that is the cause of the error.
    We are also updating a summary column called "sum_amount" that belongs to H1.
    How are you updating this Summary Column? Is the SUM_AMOUNT column a calculated field or have you written code that updates this column? Is the SUM_AMOUNT column a database field?

    It would also be extreamly helpful if you gave us your Forms version; in fact, you should always give this information! :)

    Craig...
  • 2. Re: FRM - 40654 Record has been updated by another user. Requery the record to
    951614 Newbie
    Currently Being Moderated
    Thanks.
    Oracle forms version 10g is being used here.
    If it is not Post-Update, what is the alternative apart from using the post - update trigger so that the columns price and amount are updated as soon as exchange rate is updated.

    Regards
    SR
  • 3. Re: FRM - 40654 Record has been updated by another user. Requery the record to
    CraigB Guru
    Currently Being Moderated
    If it is not Post-Update, what is the alternative apart from using the post - update trigger so that the columns price and amount are updated as soon as exchange rate is updated.
    Have you commented-out the Post-Update trigger yet?

    Typically, I tend to use the On- or Pre- triggers (On-Update/Pre-Update). However, I think you will have the same error using either of these triggers. More importantly, I need to know the answer to my previous question:
    We are also updating a summary column called "sum_amount" that belongs to H1.
    How are you updating this Summary Column? Is the SUM_AMOUNT column a calculated field or have you written code that updates this column? Is the SUM_AMOUNT column a database field?>
    My first reaction is that this process is the most likely cause of your FRM-40654 error, but that is just a guess.

    Craig...
  • 4. Re: FRM - 40654 Record has been updated by another user. Requery the record to
    Bhushan53 Newbie
    Currently Being Moderated
    why do you want to make direct updates to database post update. Instead, change the values in your fields "price and amount" when the user enters/updates the exchange rate. ON-UPDATE trigger will take care of updating both the tables.

    or, not a preferred way to do this.. but, follow each of your update statements with FORMS_DDL('COMMIT');

Legend

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