Master-Detail Forms Question

From: Lauren Sharman <lauren_sharman_at_my-deja.com>
Date: Mon, 17 Apr 2000 21:46:53 GMT
Message-ID: <8dg0o9$l8k$1_at_nnrp1.deja.com>



I'm new to Oracle Forms and have to fix a bug in an existing application. Since this is a production system, I am locked into a bad database design and need to code around the design.

My master table is defined as:

   item_id
   short_desc
   long_desc

My detail table is defined as:

   item_id
   short_desc
   long_desc
   expire_date
   ... other fields

There is a one to many relationship between the master and detail tables with the item_id as the foreign key.

My form contains two sections, a master section and a detail section. The master section displays the item_id, short_desc, and long_desc. The short_desc and long_desc are editable. The detail section displays the "other fields", all of which are editable. If the short_desc or the long_desc changes, I need to update the short_desc and long_desc fields in each record in the detail section where detail.item_id = master.item_id and the detail.expire_date has not expired.

Since the user could simultaneously update the master and the detail records through the form, I can't put a database update trigger on the master table. So, I'm trying to use the 'PRE-UPDATE' trigger on the master section of my form. But, I don't know how to cycle through the records in the detail section.

Can anyone give me the specifics on how to do this?

Thanks

Lauren Sharman

Sent via Deja.com http://www.deja.com/
Before you buy. Received on Mon Apr 17 2000 - 23:46:53 CEST

Original text of this message