oracle forms builder里SET_BLOCK_PROPERY是干啥用的?怎么用

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了oracle forms builder里SET_BLOCK_PROPERY是干啥用的?怎么用相关的知识,希望对你有一定的参考价值。

SET_BLOCK_PROPERY,是设置BLOCK属性的,具体的用法,可以参看form builder开发工具中提供的帮助文档。 参考技术A PROCEDURE Make_Block_Query_Only( blk_name IN VARCHAR2 )
IS
blk_id Block;
BEGIN
/* Lookup the block's internal ID */
blk_id := Find_Block(blk_name);
/*
** If the block exists (ie the ID is Not NULL) then set
** the three properties for this block. Otherwise signal
** an error.
*/
IF NOT Id_Null(blk_id) THEN
Set_Block_Property(blk_id,INSERT_ALLOWED,PROPERTY_FALSE);
Set_Block_Property(blk_id,UPDATE_ALLOWED,PROPERTY_FALSE);
Set_Block_Property(blk_id,DELETE_ALLOWED,PROPERTY_FALSE);
ELSE
Message('Block '||blk_name||' does not exist.');
RAISE Form_Trigger_Failure;
END IF;
END;

Oracle Form Builder:CREATE_GROUP Built-in

 

Description                                                                                                   

Creates a non-query record group with the given name. The new record group has no columns and no rows until you explicitly add them using the ADD_GROUP_COLUMN, the ADD_GROUP_ROW, and the POPULATE_GROUP_WITH_QUERY Built-ins.

Syntax                                                                                                           

FUNCTION CREATE_GROUP

(recordgroup_name VARCHAR2,

scope NUMBER,

array_fetch_size NUMBER);

Built-in Type unrestricted function

Returns RecordGroup

Enter Query Mode yes

 

Parameters                                                                                                                 

recordgroup_name    

   The string you defined as the name of the record group at design time. When Oracle Forms creates the record group object it also assigns the object a unique ID of type RecordGroup. You can call the record group by name or by ID in later calls to record group or record group column built-in subprograms.

scope   

   Specifies whether tlhe record group can be used only within the current form or within every form in a multi-form application. Takes the following constants as arguments:  

   FORM_SCOPE  Indicates that the record group can by used only within the current form. This is the  default value.  

   GLOBAL_SCOPE  Indicates that the record group is global, and that it can be used within all  forms in the application. Once created, a global record group persists for the remainder of the runtime session.

array_fetch_size   

  Specifies the array fetch size. The default array size is 0.

CREATE_GROUP Examples                                                                                  

/*** Built-in: CREATE_GROUP ** Example: Creates a record group and populates its values ** from a query. */
DECLARE
  rg_name VARCHAR2(40) := ‘Salary_Range‘;
  rg_id   RecordGroup;
  gc_id   GroupColumn;
  errcode NUMBER;
BEGIN
  /* ** Make sure the record group does not already exist.*/
  rg_id := Find_Group(rg_name); /* ** If it does not exist, create it and add the two ** necessary columns to it. */
  IF Id_Null(rg_id) THEN
    rg_id := Create_Group(rg_name); /* Add two number columns to the record group */
    gc_id := Add_Group_Column(rg_id, ‘Base_Sal_Range‘, NUMBER_COLUMN);
    gc_id := Add_Group_Column(rg_id, ‘Emps_In_Range‘, NUMBER_COLUMN);
  END IF; /* ** Populate group with a query */
  errcode := Populate_Group_With_Query(rg_id,
                                       ‘SELECT SAL-MOD(SAL,1000),COUNT(EMPNO) ‘ ||
                                       ‘FROM EMP ‘ ||
                                       ‘GROUP BY SAL-MOD(SAL,1000) ‘ ||
                                       ‘ORDER BY 1‘);
END;

以上是关于oracle forms builder里SET_BLOCK_PROPERY是干啥用的?怎么用的主要内容,如果未能解决你的问题,请参考以下文章

刚接触ORACLE FORM BUILDER ,请教一个基本的问题,新建了一个堆叠画布,怎么把它显示在主画布上。

Oracle Forms Builder:无法执行查询

Oracle Form Builder:CREATE_GROUP Built-in

PL/SQL 和 Oracle Forms Builder

oracle forms builder pl/sql - 访问从其他列派生的列

使用复选框在父表中搜索 (Oracle Forms Builder)