Home » Developer & Programmer » Forms » FRM-40654 on some rows only ???
FRM-40654 on some rows only ??? [message #588626] Thu, 27 June 2013 03:25 Go to next message
amauri
Messages: 18
Registered: May 2013
Location: Italy
Junior Member
Hi,

I developed a small app using forms, which queries a table in our DB and allows the user to edit some of the values in a grid-like format.
Sometimes I get this FRM-40654 error when trying to key in a value in a column. Sometimes means that it may happen or not happen at all, but also that it happens on some of the queries rows and not on others. IN one case I have 4 rows and it happens on all but the 2nd
The table has a small trigger on it:

CREATE OR REPLACE TRIGGER MFI_CT_T_TRG1
before UPDATE ON MFI_CITY_TAX_T
REFERENCING OLD AS old NEW AS new
FOR EACH ROW
BEGIN
:new.modified_on := sysdate;
:new.modified_by := pms_p.logged_uid;
END;
/

But I tried already to remove it and it didn't work.
I set the DML Returning Values of the block to Y, still the same.

Any ideas?
Re: FRM-40654 on some rows only ??? [message #588640 is a reply to message #588626] Thu, 27 June 2013 04:30 Go to previous messageGo to next message
Littlefoot
Messages: 18844
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
(Just for the record, as people usually don't recognize all errors just by their code):
Oracle

FRM-40654: Record has been updated by another user. Re-query to see change.

Cause:  Another user has updated this record since you performed a query and has changed at least one field in the record. Your actions have not changed the record in memory.

Action:  You can update or delete this record now only if another user has restored the field values back to the way they were when you performed the query. Otherwise, you must re-query to fetch and display the new record into the form before you can update or delete it.


What about the obvious - maybe someone else really updated these records (between you fetched and updated them)? If that's so, try to set block's Locking Mode property to "Delayed". If it doesn't help either, see whether you can rewrite the form so that its data source is a SELECT statement which includes FOR UPDATE clause (never tried that so I can't guarantee that it is a good idea).

On the other hand, I'm rather sure that someone else will suggest something far simpler and solve your problems (just be patient!).
Re: FRM-40654 on some rows only ??? [message #588642 is a reply to message #588640] Thu, 27 June 2013 04:37 Go to previous message
amauri
Messages: 18
Registered: May 2013
Location: Italy
Junior Member
Hi Littlefoot,

after hammering my head against the wall, I noticed that I had inadvertently deletedd the contents of field DML Taget Name in 'Advanced Database' of the block.
I entered it again and it's now working...
...though I still don't understand why it was working for some rows only...
Previous Topic: Creating alert
Next Topic: FRM-40735: WHEN-NEW-FORM-INSTANCE trigger raised unhandled exception ORA-06502
Goto Forum:
  


Current Time: Wed Apr 23 21:45:00 CDT 2014

Total time taken to generate the page: 0.11672 seconds