ORA-01445: cannot select ROWID from, or sample, a join view
without a key-preserved table
FRM-40501: ORACLE error: unable to reserve record for update or
delete.
Forms开发中 编译后会遇到 上述问题 错误提示
解决办法
在当前的Data Block中 添加一个trigger on-lock
目的是当操作当前行的数据时候进行锁定,防止别人进行修改
on-lock trigger中 填写 null; 即可
以下是on-lock trigger 介绍
Description
Fires whenever Form Builder would normally attempt to lock a
row, such as when an operator presses a key to modify data in an
item. The trigger fires between the keypress and
the display of the modified data.
Definition Level form or block
Legal Commands
SELECT statements, unrestricted built-ins
Enter Query Mode no
Usage Notes
n Use an On-Lock trigger to replace the default
Form Builder processing for locking rows. For
example, for an application intended for use on a single-user
system, use the On-Lock trigger to speed processing by bypassing
all lock processing. Also, use On-Lock when
accessing a non-ORACLE data source directly, not by way of Open
Gateway.
n When the On-Lock trigger fires as a result of
an operator trying to modify data, the trigger fires only the first
time the operator tries to modify an item in the
record. The trigger does not fire during
subsequent modifications to items in the same
record. In other words, for every row that is to
be locked, the trigger fires once.
n To perform the default Form Builder
processing from this trigger, include a call to the LOCK_RECORD
built-in.
n Use this trigger to lock underlying tables
for non-updateable views.
Caution
In special circumstances, you may use the LOCK TABLE DML statement
in an On-Lock trigger. However, as this could
result in other users being locked out of the table, please
exercise caution and refer to the ORACLE RDMS Database
Administrator's Guide before using LOCK TABLE.
On Failure
When the On-Lock trigger fails, the target record is not locked
and Form Builder attempts to put the input focus on the current
item. If the current item cannot be entered for
some reason, Form Builder attempts to put the input focus on the
previous navigable item.
Fires In
Lock the Row
--刘轶鹤