Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

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

Status
Not open for further replies.

prosuc

Programmer
Aug 14, 2002
53
CL
I am working with Personal Oracle, nobody connected at the same time, but when I commit the form, developer send me the following message:

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

¿¿¿???
 
Do you have any pre or post insert, update or delete triggers on your block(s)?
 
It resembles the situation when you have database triggers that change your record. If this is the case, you need to requery those changes.

Regards, Dima
 
yes, lewisp I have a pre-insert trigger that update a item with the result from a function that use the same record.

Now, I think that it is the problem.....
 
Try renaming the trigger to PRE_INSERT and see if that cures your problem. If it does, consider rewriting the trigger to be more 'form friendly'.
 
Hi,
To overcome this problem after issuing commit_form simply get the Last query criteria from :system.last_query, prepare a where clause,set it as Default where of your block and then write execute_query.

Regards
Himanshu
 
Himanshu, more "natural" way is to repopulate changed items in post-[insert|update] Forms trigger.

Regards, Dima
 
Dima,
Thanks for your input.Even more "natural" way to do this is to set the Block's property "DML Returning Value property" to Yes but has following restrictions:

Restrictions

->Forms uses the DML Returning clause only with an Oracle8 database server. This property is ignored when using a non-Oracle8 server.

->Forms uses the Returning clause with Insert and Update statements, but (currently) not with Delete statements.

->Forms does not use the Returning clause when processing LONGs.

->The updating of unchanged columns is controlled by the setting of the Update Changed Columns Only property, which in turn is affected by the setting of the DML Array Size property.

Regards
Himanshu
 
Sure, but only since 6.0 :)

Regards, Dima
 
thanks for your comments, I solve the problem re-executing the query before/after commit it.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top