Oracle ORA-01445 - Cannot Select ROWID From a Join View Without a Key Preserve Table
ORA-01445无法从不带保留关键字的表的联接视图中选择ROWID或采样
表单正试图选择 ROWID 作为基本表查询的一部分。
服务器返回的信息是,这是一个多表视图,没有保留键的表,因此窗体不会选择 Rowid。
此时,数据块级别的键模式属性被设置为 “自动”。
表单会在内部将此块标记为基于多表视图,因此无法更新。
键模式属性指定了窗体如何在数据库中唯一标识行。
在数据库中唯一标识行的方式。默认情况下,Oracle 使用唯一的 ROWID 值来标识每一行。
由于该视图是基于两个不同的表创建的,因此键模式属性应设置为不可更新。这将导致表格不包含主键。
如果数据库允许使用主键,则应将键模式属性设置为
为可更新,然后根据一个或多个列以及块级别上的至少一个项目创建主键。
Forms is trying to select ROWID as part of the base table query.
The server returns information that it is a Multi Table View and there is no Key preserved table therefore Forms does not select the Rowid.
At this point the key mode property at the block level is set to Automatic.
Forms internally marks this block as being based on a multi table view and therefore cannot update it.
The Key mode property specifies how Forms uniquely identifies rows
in the database. By default, Oracle uses unique ROWID values to identify each row.
Since this view was created based on two different tables, the key mode property should be set to Non-Updatable. This will cause Forms not to include primary keys.
If the database allows primary keys, then set the key mode property
to updatable and then create a primary key based on one or more columns and at least one item at the block level.
SOLUTION
1) In the block properties change the key mode property of the block to NON-UPDATABLE Primary Key.
2) Make one or more columns primary keys in their item property palette(s).
--刘轶鹤