Re: developer 2000 master detail relationship

From: . <lbo_ninja_1999_at_yahoo.com>
Date: 2000/04/20
Message-ID: <8dmcl4$1uma$2_at_buty.wanadoo.nl>#1/1


What I'll do:
* modify the “before insert database trigger” in such way that it assign value to the pk only if the new value is null. Like that, if you want to do a manuel insert in sql/plus, you'll have no problem. * create a trigger "pre-insert" in the form to assign the value to the pk.

At the commit moment, the pre-insert from the masterblock will be fire first and all must be allright for the commit of the detail.

Luc Bosman
DEV/2000 Software Engineer
Database and Network Administrator
l.bosman_at_wanadoo.be


|  -°)                                          (°-  |
|  /\\  Linux the choice of the GNU generation  //\  |
| _\_v                                          v_/_ |
 ----------------------------------------------------


ssharma24_at_my-deja.com a écrit dans le message <8dlafu$ien$1_at_nnrp1.deja.com>...
>I have a form that has a master and detail block…
>Master block (tabular form) is based on a table that has a primary key
>which is coming from a “sequence” and a “before insert database
>trigger”.
>Detail block (tabular form) is based on a table that has the primary
>key of the above block as its foreign key.
>When ever I add a record in the master block and save it, that’s when
>the primary key gets added to the record (right before the insertion to
>the database). But at this point the value doesn’t show in the actual
>field on the form. If I hit f7 and f8 then It shows up.
>
>The problem is that the detail block foreign key has “copy value from
>item property” filled with master_block.primary_key. So, the moment
>for which that field is empty, the value doesn’t get filled.
>Is there a way out of this problem. So that, users don’t have to hit f7
>and f8 to start adding values to the detail block.
>
>Thanks..
>
>
>Sent via Deja.com http://www.deja.com/
>Before you buy.
Received on Thu Apr 20 2000 - 00:00:00 CEST

Original text of this message