`
xitong
  • 浏览: 6203749 次
文章分类
社区版块
存档分类
最新评论

NAME_IN and COPY built-in

 
阅读更多
You can reference items indirectly with the NAME_IN and COPY built-in subprograms.
The NAME_IN function returns the contents of an indicated variable or item.Use the NAME_IN function to get the value of an item without referring to the item directly.
The following statements are equivalent:

IF :emp.ename = 'smith' -- direct reference
IF NAME_IN('emp.ename') = 'smith' -- indirect reference

The return value is always a character string.To use NAME_IN for a DATE or NUMBER item, convert the string to the desired data type with the appropriate conversion function:

date_var := TO_DATE(Name_In('order.date_item'));
num_var := TO_NUMBER(Name_In('order.number_item'));

Notes on NAME_IN:

*The NAME_IN function cannot return the contents of a global or local variable.

*In PL/SQL triggers that will be executed in enter-query mode, you must use NAME_IN rather than normal bind-variable notation to access values in the data-block.(This is because the end-user mighttype relational operators into the item, producing a value which is not in a form that can be processed by PL/SQL.)

The COPY ProcedureThe COPY procedure assigns an indicated value to an indicated variable or item.Unlike standard PL/SQL assignment, however, using the COPY procedure allows you to indirectly reference the item whose value is being set:

:emp.ename := 'smith'; -- direct reference
Copy('smith','emp.ename'); -- indirect reference


COPY can be used with the NAME_IN function to assign a value to an item whose name is stored in a reference variable or item:

/* put value 'smith' in item whose name is stored in ref_item */
Copy('smith',Name_In('control.ref_item'));

Why Use Indirect ReferenceReferencing items indirectly allows you to write more generic, reusable code.By using variables in place of actual item names, you can write a subprogram that can operate on any item whose name has been assigned to the indicated variable.
Also, using indirect reference is mandatory when you refer to the value of a form bind variable (item, parameter, global variable) in PL/SQL that you write in a library or a menu module. Because libraries, menus, and forms are separate application modules, you cannot refer directly to the value of a form item in a menu-item command or library procedure.

library is not saved within form. but in different file, so there is no where to find :frm1.txt1

for example, if you have a procedure in library:

procedure p1( v_one varchar2)

name_in(v_one) to get the value inside v_one, that is :frm1.txt1, so:

copy('value', name_in(v_one)) ==> to copy value to the txt field txt1 in form frm1.

you can't use:

copy('value', :frm1.txt1), nor you can:

copy('value', v_one).


分享到:
评论

相关推荐

    FlexGraphics_V_1.79_D4-XE10.2_Downloadly.ir

    - FIX: In "Windows ClearType" font rendering mode (OS Windows mode) the "garbage" pixels can appear from the right and from the bottom sides of the painted rectangle of the TFlexText object....

    ARM® Compiler v5.06 for µVision® armasm User Guide

    6.4 Built-in variables and constants 6.5 Identifying versions of armasm in source code 6.6 Diagnostic messages 6.7 Interlocks diagnostics 6.8 Automatic IT block generation 6.9 Thumb branch target ...

    ap6212a0_a33_sc3817r_服务器验证通过_bt已经通了_wifi需要修改配置_需要再次验证_20170626_1549.7z

    #PRODUCT_COPY_FILES += frameworks/native/data/etc/android.hardware.location.xml:system/etc/permissions/android.hardware.location.xml # evb logger PRODUCT_COPY_FILES += \ device/softwinner/astar-y3/...

    hm1375_parrotv1.1验证通过_20170824_1528.7z

    1 for camera without isp(using built-in isp of Axx) ; 0 for camera with isp ;------------------------------------------------------------------------------- use_builtin_isp = 0 ;-------------------...

    ap6212a0_a33_sc3817r_神舟验证版本_借用nvram_ap6210这个配置文件_20170626_1834没有外层目录.7z

    #PRODUCT_COPY_FILES += frameworks/native/data/etc/android.hardware.location.xml:system/etc/permissions/android.hardware.location.xml # evb logger PRODUCT_COPY_FILES += \ device/softwinner/astar-y3/...

    softap_ap6212a0_tinav2.1_验证通过_旧版本的系统_20170915_1223没有外层目录.7z

    rootroot@cm-System-Product-Name:/home/wwt$ tar zxvf tinaV2.1_wyb_20170302_patch_leo_20161102.tar.gz rootroot@cm-System-Product-Name:/home/wwt$ mv tinaV2.1 softap_ap6212a0_tinav2.1 rootroot@cm-System...

    mysql-5.5.43.tar.gz

    # and INSTALL_NAME_DIR (CMP0042) IF(CMAKE_VERSION VERSION_EQUAL "3.0.0" OR CMAKE_VERSION VERSION_GREATER "3.0.0") CMAKE_POLICY(SET CMP0026 OLD) CMAKE_POLICY(SET CMP0045 OLD) CMAKE_POLICY(SET CMP...

    Senfore_DragDrop_v4.1

    NO_WIN32_LEAN_AND_MEAN The define *must* be made in the project options. It is not sufficient to #define it in the source. If you manage to compile with C++ Builder (any version), I would very ...

    ImpREC 1.7c

    function in the thunk and will get its module name. => Much faster when editing each function by hand. - Improved 'Exact Call' (It will not retrace all exact calls from a slot if they have ...

    php.ini-development

    in production environments and one that is recommended to be used in ; development environments. ; php.ini-production contains settings which hold security, performance and ; best practices at its ...

    Spectral Core Full Convert Enterprise v6.11.0.1683

    Built-in table Print Preview and Print Table Customization Table customization available for each table separately Renaming of both table and each column Skipping of certain columns in conversion ...

    squashfs2.2-r2.tar.gz

    in cases where a .tar.gz file may be used), and in constrained block device/memory systems (e.g. embedded systems) where low overhead is needed. 1. SQUASHFS OVERVIEW -------------------- 1. Data, ...

    cradio_龙卷风收音机

    You can use the built-in recording to record them and save them into MP3 files. 03 Timing playing and recording You can previously add, modify and delete the “play or record schedule”, and when ...

    UE(官方下载)

    Use UltraEdit's built-in handling for character-separated value files Word wrap and tab settings for different file types UltraEdit and UEStudio allow you to customize the word wrap and tab settings ...

    Learning Joomla! 1.5 Extension Development Creating Modules, Components, and Plugins with PHP

    Retrieving the values of these parameters is standardized through built-in functions. Chapter 9 expands the XML fles used for parameters and adds a listing of all the fles in each ...

    ICS delphixe10源码版

    ICS V9 is in early development and is planned to support Android. There are no current plans for ICS for iOS. Version Control repository: --------------------------- svn://svn.overbyte.be/ics or ...

    apktool documentation

    unknownFiles - Used to record name/location of non-standard files in an apk in order to place correctly on rebuilt apk sharedLibrary - Used to help support Android 5 shared library feature by ...

    Google C++ Style Guide(Google C++编程规范)高清PDF

    Classes Doing Work in Constructors Default Constructors Explicit Constructors Copy Constructors Structs vs. Classes Inheritance Multiple Inheritance Interfaces Operator Overloading Access Control ...

    EurekaLog_7.5.0.0_Enterprise

    8)....Added: Exception line highlighting in disassember view in EurekaLog exception dialog and Viewer 9)....Added: Detection/logging Delphi objects in disassembly view 10)..Added: Support for multi-...

    rx第三方控件

    TRxCheckListBox is a list box with built-in check boxes. TRxSpeedButton provides you more features than the standard TSpeedButton component, such as Transparent, Flat, AllowTimer and GrayedInactive ...

Global site tag (gtag.js) - Google Analytics