Re: Forms 4.5 - Block based on a View

From: Steve Cosner <stevec_at_zimmer.CSUFresno.EDU>
Date: 1996/05/16
Message-ID: <4nh63c$idl_at_zimmer.CSUFresno.EDU>#1/1


There is an easier way, as long as you are only updating one of the tables in the view:

Create the view including the rowid of the table to be updated. Create the base-table block with all the items in the view. Set the non-base-table items' "Base Table" property to false.

Then in the on-select trigger (I think), bypass the normal execute_query step, and instead, use a PL/SQL loop with a cursor to select the data from the view into the block. The table's rowid should be fetched into the block's rowid.

After this is done, the block can be treated the same as any base-table block for updating.

Steve Cosner

In article <319bd17b.658426_at_dcsun4>, Thomas J Kyte <tkyte_at_us.oracle.com> wrote:
>rbrisson_at_centrum.dk (René Brisson) wrote:
>>In article <4mhg9s$avp_at_news.mel.aone.net.au>, simonc_at_oakton.com.au (Simon) says:
>>>table_a (table_a_id number, desc_a varchar2(10), table_b_id number )
>>>table_b (table_b_id number, desc_b varchar2(10) )
>>>
>>>Originally I had a simple block based on table_a,
>>>with a post_query trigger to look up table_b.desc_b based
>>>on table_a.table_b_id.
>>>i.e. A block based on table_a with columns for:
>>> table_a_id, desc_a, desc_b
>>>
>>>The *User* now wants to have the block ordered by desc_b.
  Received on Thu May 16 1996 - 00:00:00 CEST

Original text of this message