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


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

    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

    --刘轶鹤

  • 相关阅读:
    Navicat16连接Oracle报错:Oracle library is not loaded
    qt 文本滚动条
    3D全景:为各行业提供更真实的交互体验
    2022软件测试工程师面试避坑策略
    【Flask框架】四. Flask框架之 MySQL数据库操作及项目重构
    云服务器实例重启后,各个微服务的接口(涉及mysql操作的)都用不了了
    2023/10/23 mysql学习
    [附源码]JAVA毕业设计桔子酒店客房管理系统(系统+LW)
    mysql根据条件导出表数据(`--where=“文本“`)
    Window环境下安装VMware虚拟机来安装 CentOs7
  • 原文地址:https://blog.csdn.net/AlexLiu_2019/article/details/125377701