Solved

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

Posted on 2006-06-28
10
6,641 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
10 Comments
 
LVL 11

Expert Comment

by:mohammadzahid
Comment Utility
0
 

Author Comment

by:ayadav1186
Comment Utility
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
Comment Utility
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
 
LVL 13

Expert Comment

by:riazpk
Comment Utility
In ON-LOCK block level trigger, code

NULL;
0
PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

 
LVL 16

Expert Comment

by:MohanKNair
Comment Utility
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 200 total points
Comment Utility
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 34

Assisted Solution

by:Mark Geerlings
Mark Geerlings earned 200 total points
Comment Utility
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
Comment Utility
errm, markgeer is right, my sample is just incomplete
0
 
LVL 1

Expert Comment

by:Computer101
Comment Utility
Forced accept.

Computer101
EE Admin
0

Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Join & Write a Comment

Cursors in Oracle: A cursor is used to process individual rows returned by database system for a query. In oracle every SQL statement executed by the oracle server has a private area. This area contains information about the SQL statement and theā€¦
From implementing a password expiration date, to datatype conversions and file export options, these are some useful settings I've found in Jasper Server.
Via a live example show how to connect to RMAN, make basic configuration settings changes and then take a backup of a demo database
This videos aims to give the viewer a basic demonstration of how a user can query current session information by using the SYS_CONTEXT function

762 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now