developer 2000 detail block foreign key
Date: 2000/04/20
Message-ID: <8do448$m2g$1_at_nnrp1.deja.com>#1/1
Hi Guys...
I had a problem with the master-detail relationship earlier...some
people suggested certain things...but I am still having problems..
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 I set the intial value property
to ':sequence.sequence_name.nextval' for the primaty key item.
Detail block (tabular form) is based on a table that has the primary
key of the above block as its foreign key. The detail block foreign key
has “copy value from item property” filled with
master_block.primary_key. The problem is that when I am saving the
master block record, the associated detail block record is not getting
the value of the primary key (Master Block) copied to its foreign key
until I move the cursor away atleast once from the master record and
comes back to the same record. So, put a post-insert trigger on the
master block saying
:detail.foreign_key := master.primary_key
The problem I am having is that I am not being able to save a record
now in master without having records in detail block (since detail
block has some “not null --- required” fields in it…)
As soon as I hit f10, it gives me an error saying that a required field
can not be empty.
Thanks..
Sent via Deja.com http://www.deja.com/
Before you buy.
Received on Thu Apr 20 2000 - 00:00:00 CEST