FRM-40501: ORACLE error: unable to reserve record for update or delete

Hi Guys,
I have form that takes view (created from several tables) once loaded,  I tried to press any editing key,
It throws error below

FRM-40501: ORACLE error: unable to reserve record for update or delete

Please let me know what I am doing wrong?
Thank you
Anil.
ayadav1186Asked:
Who is Participating?
 
kretzschmarConnect With a Mentor Commented:
riazpk is right

of course if there is no instead of trigger is attached on your view,
you may not able to save your changes, except you use the
ON-UPDATE/ON-INSERT/ON-DELETE trigger on block-level
to update the physical tables of the view

instead of placing NULL in the ON-LOCK trigger in case of
you want to lock, you can place there also

SELECT * FROM physicalTable WHERE key = :blockkey FOR UPDATE;
--repeat for every table in the view

meikl ;-)
0
 
mohammadzahidCommented:
0
 
ayadav1186Author Commented:
Lot many workarounds but does not work for me. One thing I noticed is Forms tries to lock row by adding rowid in front of view columns. Is there any way to prevent Forms from doing so?
I am able to update view in SQL*Plus wihout any issues.


Thanks for response.
0
Never miss a deadline with monday.com

The revolutionary project management tool is here!   Plan visually with a single glance and make sure your projects get done.

 
MohanKNairCommented:
As the above link suggests, is there any other user using the same view or table? Query v$lock and v$locked_object views.
v$locked_object tells about the table names that are locked.

0
 
riazpkCommented:
In ON-LOCK block level trigger, code

NULL;
0
 
MohanKNairCommented:
v$lock and v$locked_object views are available in the database server. Connect as sysdba and do the query.
0
 
Mark GeerlingsConnect With a Mentor Database AdministratorCommented:
I agree with kretzschmar, you need to write an ON-LOCK trigger manually for a block that is based on a join view, but I think his syntax example is incomplete.  I think the trigger syntax you need is more like this:
declare
  cursor c_lock is select 1
    from [base table]
    where [key column] = :[block_name].[key_column]
       for update of [any column] nowait;
  dummy number;
begin
  open c1;
  fetch c1 into dummy;
  close c1;
exception
  when others then
     [display a message or alert about the record lock problem]
end;
0
 
kretzschmarCommented:
errm, markgeer is right, my sample is just incomplete
0
 
Computer101Commented:
Forced accept.

Computer101
EE Admin
0
All Courses

From novice to tech pro — start learning today.