Home » Developer & Programmer » Forms » Overriding FRM-40654:Record has been updated by another user... (Oracle 11g)
Overriding FRM-40654:Record has been updated by another user... [message #635120] Fri, 20 March 2015 14:18 Go to next message
suj_it
Messages: 5
Registered: December 2012
Junior Member
I get the error
FRM-40654:Record has been updated by another user. Re-query to see change
when I have someone else modified a field in a table after I have the data populated on the form. Now that we have multiple kinds of applications (other than Oracle forms, we have Web and Mobile devices) accessing data and possibly modifying something on the same record, this error is more frequent.

Please note:
- I DO NOT HAVE LOCKING ISSUE. All transactions are complete with Commit.
- I do not want to Requery. Because I do not want the changes by another user overwrite my changes. I being the one doing final "Submit Order", should have the last say on what data to be saved.

Basically all I want to do is whichever user clicks the "Submit Order" button, saves whatever is there on his form, irrespective of any changes already made by someone else to some field on the record. The person doing submit should not get this error. Forms should simply commit the changes and mark as "SUBMITTED" in the status field (which it does when no errors).
Re: Overriding FRM-40654:Record has been updated by another user... [message #635121 is a reply to message #635120] Fri, 20 March 2015 14:33 Go to previous messageGo to next message
Littlefoot
Messages: 21580
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
It appears that all your applications should SELECT FOR UPDATE. The way it is now, you can't guarantee that records you retrieve in a form won't / can't be changed by someone else in the meantime.
Re: Overriding FRM-40654:Record has been updated by another user... [message #635122 is a reply to message #635121] Fri, 20 March 2015 14:38 Go to previous messageGo to next message
suj_it
Messages: 5
Registered: December 2012
Junior Member
Select for Update does happen when user clicks on "Submit Order" button. There are scores of steps involved and exclusively locks the record and its children records. But we can not afford to lock the record if someone just brings up the record for viewing.

It is true that we do not have a way to stop another user from modifying the record. But since out of about 10,000 orders submitted per day, we get about 4 issues of such inconsistencies. So very rarely it happens that another user (usually in the same store) has opened up the Order to modify. Now that we know the issue, all we want to easily handle is, whoever is doing "Submit Order" has the last say. Once order is "Submitted" status, we are good in handling the further changes.

[Updated on: Fri, 20 March 2015 14:43]

Report message to a moderator

Re: Overriding FRM-40654:Record has been updated by another user... [message #635149 is a reply to message #635122] Mon, 23 March 2015 04:06 Go to previous message
cookiemonster
Messages: 13894
Registered: September 2008
Location: Rainy Manchester
Senior Member
That behaviour can't be overridden by itself as far as I'm aware, it's an integral part of forms default save processing.
Only option I can think of is to base the block on a stored procedure, that way you'll have complete control.
Previous Topic: Windows username and password
Next Topic: automail with updated field value in oracle forms
Goto Forum:
  


Current Time: Fri Aug 14 21:54:12 CDT 2020