oracle - Oracle 形式的 FRM-40501

标签 oracle oracle11g oracleforms

from clause query i put a query to get data from two tables 检查代码

select empno,ename,job,mgr,hiredate,sal,comm,deptno,grade gr 
  from emp 
  left outer join salgrade on ( emp.sal between losal and hisal)

我也像代码一样将属性更改为可见和不可见

if   get_item_property('text_item17', visible) = 'TRUE' then
     set_item_property('text_item17', visible, property_false);  
else
     set_item_property('text_item17', visible, property_true);
     set_item_property('text_item17',enabled,property_true);
     set_item_property('text_item17',enabled,property_true);
     set_item_property('text_item17',NAVIGABLE ,property_true);
     set_item_property('text_item17',UPDATE_ALLOWED,property_true);
     set_item_property('text_item17',QUERYABLE,property_true);
     set_item_property('text_item17',UPDATE_NULL,property_true);
end if;

当我运行表单时出现无法更新数据的错误

最佳答案

Forms 不知道这些列属于哪个表,因此无法执行更新。

我建议您创建一个 View ,该 View 的基础数据 block ,创建一个 INSTEAD OF 触发器,它可以负责正确插入、更新和删除两个表中的行。

SET_ITEM_PROPERTY 您发布的调用与它没有任何关系(即不会解决您的问题)。

[编辑]

说你想在没有 View 的情况下解决它,我建议你不要花太多时间在这上面。如果您打开联机表单帮助并搜索“选择 block 数据源的指南”,您将看到作为数据源的FROM 子句 允许查询,但NOT 允许 DML(插入、更新和删除)。

关于oracle - Oracle 形式的 FRM-40501,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/55237049/

相关文章:

oracle - Oracle 10g-优化WHERE IS NOT NULL

oracle - 将 Oracle 数据库从一台 PC 转移到另一台 PC 的最简单方法是什么?

java - 在 Oracle JDBC 中是否可以批处理存储过程调用并检索 OUT 参数?

sql - 窗口函数排序成本很高,我们能克服它吗?

linux - 使用 webutil_file_transfer 上传文件后无法运行 UNIX 命令

oracle - Oracle Forms 6 或更高版本中是否有反射(reflect)?

oracle - 使用 UTF-8 编码从 Oracle 数据库假脱机文件时的编码问题

c# - 程序无法在 64 位 Windows 上运行

database - Oracle 11g 损坏的物化 View : Stop refresh without dropping view or refreshing view?

windows - 当我将中文字符从 Oracle 表单导出到 Excel 时,它们不再是中文了