Home » Developer & Programmer » Forms » Re: FRM-40501 unable to reserve record for update or delete
Re: FRM-40501 unable to reserve record for update or delete [message #79870] Fri, 19 July 2002 06:49 Go to next message
Kevin Meade
Messages: 2102
Registered: December 1999
Location: Connecticut USA
Senior Member
sometimes this error is generated when oracle forms does not understand how to correctly identify unique rows in the database based on its block. For example, create a view that does some joins. Then use the view as the basis of a block. The view will likely have instead of triggers to remap the dml logic correctly. If you insert a row into the view via a normal block insert, and then try to update/delete it immediately after commiting but without re-querying the block, you can get this error. This is because the form is confused about how to use ROWID to find the new row in the database. There are at least 2 solutions:

1) re-query the block after any insert operation
2) don't use ROWID as the key method for the block. This is my preferred method (I don't like being forced to requery and I always use single column numbers from a sequence for all my table's primary keys so this works well). To do this you need to do two things: a) identify the column(s) in your block that are your tables primary key by setting item property "primary key" to yes, b) set the blocks "key mode" propety to one of either non-updateable or updateable (read the forms help to find out what this means). In short this makes the block use your tables Primary key and not ROWID, when finding rows to update/delete. Thus you don't have a problem finding the row and won't get this (and related) errors.

Good luck
Re: FRM-40501 unable to reserve record for update or delete [message #640440 is a reply to message #79870] Tue, 28 July 2015 09:11 Go to previous message
Messages: 15
Registered: July 2015
Junior Member
Now its giving error as updated by another user keep trying?
Previous Topic: Parse Message
Next Topic: FRM-40735:WHEN-CUSTOM-ITEM-EVENT trigger raised unhandled exception ORA-06508.
Goto Forum:

Current Time: Sun Oct 21 23:29:38 CDT 2018