Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

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

Posted on 2006-06-28
10
Medium Priority
?
10,219 Views
Last Modified: 2009-07-29
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.
0
Comment
Question by:ayadav1186
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
10 Comments
 
LVL 11

Expert Comment

by:mohammadzahid
ID: 16999828
0
 

Author Comment

by:ayadav1186
ID: 16999884
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
 
LVL 16

Expert Comment

by:MohanKNair
ID: 16999904
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
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
LVL 13

Expert Comment

by:riazpk
ID: 17000403
In ON-LOCK block level trigger, code

NULL;
0
 
LVL 16

Expert Comment

by:MohanKNair
ID: 17000457
v$lock and v$locked_object views are available in the database server. Connect as sysdba and do the query.
0
 
LVL 27

Accepted Solution

by:
kretzschmar earned 800 total points
ID: 17000881
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
 
LVL 35

Assisted Solution

by:Mark Geerlings
Mark Geerlings earned 800 total points
ID: 17002619
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
 
LVL 27

Expert Comment

by:kretzschmar
ID: 17007250
errm, markgeer is right, my sample is just incomplete
0
 
LVL 1

Expert Comment

by:Computer101
ID: 20295077
Forced accept.

Computer101
EE Admin
0

Featured Post

Learn Veeam advantages over legacy backup

Every day, more and more legacy backup customers switch to Veeam. Technologies designed for the client-server era cannot restore any IT service running in the hybrid cloud within seconds. Learn top Veeam advantages over legacy backup and get Veeam for the price of your renewal

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Why doesn't the Oracle optimizer use my index? Querying too much data Most Oracle developers know that an index is useful when you can use it to restrict your result set to a small number of the total rows in a table. So, the obvious side…
How to Create User-Defined Aggregates in Oracle Before we begin creating these things, what are user-defined aggregates?  They are a feature introduced in Oracle 9i that allows a developer to create his or her own functions like "SUM", "AVG", and…
This video shows how to copy a database user from one database to another user DBMS_METADATA.  It also shows how to copy a user's permissions and discusses password hash differences between Oracle 10g and 11g.
This video shows how to copy an entire tablespace from one database to another database using Transportable Tablespace functionality.

636 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question