zoukankan      html  css  js  c++  java
  • [Form Builer]Locking Mode and LOCK_RECORD

    Locking Mode Property                

    Description                    

    Specifies when Oracle Forms tries to obtain database locks on rows that correspond to queried records in the form.

    The following table describes the allowed settings for the Locking Mode property:

       
       
       
       

    Value                           Description

    Automatic (default)        Identical to Immediate if the datasource is an Oracle database. For other datasources, OracleForms determines the available locking facilities

                                        and behaves as much like Immediate as possible.默认值:修改记录时Forms会立即锁定数据库记录

    Immediate                   Oracle Forms locks the corresponding row as soon as the end user presses a key to enter or edit the value in a text item.

                                       与Automatic一样,一般情况下建议使用Automatic代替Immediate

    Delayed                       Oracle Forms locks the row only while it posts the transaction to the database, not while the end user is editing the record.

                                       Oracle Forms prevents the commit action from processing if values of the fields in the block have changed when the user

                                       causes a commit action.在post事务保存时Forms才尝试锁定记录

    LOCK_RECORD Built-in       

    Description (尝试立即锁定相关的record,而不管lock mode是自动(立即)或是延迟)       

    Attempts to lock the row in the database that corresponds to the current record. LOCK_RECORD locks the record immediately, regardless of whether the Locking Mode block property is set to Immediate (the default) or Delayed. When executed from within an On-Lock trigger, LOCK_RECORD initiates default database locking. The following example illustrates this technique.

    Syntax          

    PROCEDURE LOCK_RECORD;

    Built-in Type unrestricted procedure

    Enter Query Mode no

    Parameters none

    LOCK_RECORD Examples       

    /*

    ** Built-in: LOCK_RECORD

    ** Example: Perform Oracle Forms standard record locking on the

    ** queried record which has just been deleted or

    ** updated. Decide whether to use default

    ** processing or a user exit by consulting a

    ** global flag setup at startup by the form,

    ** perhaps based on a parameter.

    ** Trigger: On-Lock

    */

    BEGIN

    /*

    ** Check the global flag we set up at form startup

    */

    IF :Global.Non_Oracle_Datasource = 'TRUE' THEN

    User_Exit('my_lockrec block=EMP');

    /*

    ** Otherwise, do the right thing.

    */

    ELSE Lock_Record;

    END IF;

    END;

    ############################## 通往精神的路很多,物质只是其中一种 ##############################
    http://www.onejava.com/article/oracle/wip/wiptop.htm
    https://docs.oracle.com/cd/A60725_05/html/comnls/us/index.htm
    http://www.oracle.com/technetwork/cn/developer-tools/apex/getting-started-094884-zhs.html
    https://docs.oracle.com/cd/B34956_01/current/html/docset.html
  • 相关阅读:
    day04-交互、格式化输出及基本运算符
    day03-执行python方式、变量及数据类型简介
    day02-操作系统、编程语言分类及python安装
    day01-编程与计算机组成原理
    Appium测试环境搭建实践
    Windows环境下多线程编程原理与应用读书笔记(3)————Windows环境中的多线程实现(3)
    Windows环境下多线程编程原理与应用读书笔记(3)————Windows环境中的多线程实现(2)
    Windows环境下多线程编程原理与应用读书笔记(3)————Windows环境中的多线程实现(1)
    Windows环境下多线程编程原理与应用读书笔记(2)————面向对象技术
    Windows环境下多线程编程原理与应用读书笔记(1)————基本概念
  • 原文地址:https://www.cnblogs.com/pompeii2008/p/5412492.html
Copyright © 2011-2022 走看看