简体   繁体   English

Oracle APEX DML 表单(无报告)不显示表中的现有数据

[英]Oracle APEX DML form (with no report) doesn't show existing data in the table

I've been able to create APEX forms with reports and interactive grids successfully, but when I tried to just create a simple DML form, using the wizard, I get a page where I can create a row, but I can't see the existing data in the table.我已经能够成功创建带有报表和交互式网格的 APEX 表单,但是当我尝试使用向导创建一个简单的 DML 表单时,我得到了一个可以创建行的页面,但是我看不到表中的现有数据。

This particular table always has only one row and I just need a form to update that 1 row.这个特定的表总是只有一行,我只需要一个表单来更新那一行。 How can I get this view to open in update mode?我怎样才能让这个视图在更新模式下打开?

If you don't know ahead of time what any of the values in one of the columns, you can use ROWID as the primary key and set it to the row's ROWID in order to trigger the automatic row fetch process.如果您事先不知道其中一列中的任何值是什么,您可以使用 ROWID 作为主键并将其设置为行的 ROWID 以触发自动行提取过程。

  1. Create a hidden item called P1_ROWID .创建一个名为P1_ROWID的隐藏项。 Its Source should be set to Database Column, ROWID .Source应设置为 Database Column, ROWID

  2. On the Automatic Row Fetch process, set Primary Key Column to ROWID and Primary Key Item to P1_ROWID .在 Automatic Row Fetch 过程中,将Primary Key Column设置为ROWID ,将Primary Key Item 设置P1_ROWID

  3. Create an additional process, to run before the automatic row fetch process, that executes a query like the following:创建一个额外的进程,在自动行提取进程之前运行,它执行如下查询:

     select rowid into :P1_ROWID from mytable;

在此处输入图片说明

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM