加载中…
个人资料
  • 博客等级:
  • 博客积分:
  • 博客访问:
  • 关注人气:
  • 获赠金笔:0支
  • 赠出金笔:0支
  • 荣誉徽章:
正文 字体大小:

Oracle Forms 编译时ORA-01445和 FRM-40501错误

(2012-04-26 09:45:49)
标签:

ora-01445

frm-40501

it

分类: 技术类

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

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.

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.

To perform the default Form Builder processing from this trigger, include a call to the LOCK_RECORD built-in.

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

--刘轶鹤

0

阅读 收藏 喜欢 打印举报/Report
  

新浪BLOG意见反馈留言板 欢迎批评指正

新浪简介 | About Sina | 广告服务 | 联系我们 | 招聘信息 | 网站律师 | SINA English | 产品答疑

新浪公司 版权所有