Re: Forms 5.0 - Master-detail problems

From: WvA <wesselX_at_wau.misX.ah.nl>
Date: 1998/03/31
Message-ID: <EqovMI.7z4_at_wau.mis.ah.nl>#1/1


Adrian Klingel wrote in message <35203C2D.C55F2CA6_at_nospam.nt.com>...
>Please help me before my head explodes. I've got a tab form. On one of
>
>the tabs are two blocks set up master-detail style. The information in
>the detail is not found all in one table, so I had to base it on a view,
>
>since it appears I can't base a block on more than one table. But I
>can't insert into a view! Somebody please tell me there's a way to do
>this. If I have to write some code, that's great. I just need to get
>this thing done. I feel like I'm missing something really basic here.
>
>Thanks in advance,
>Adrian
>Please remove "nospam." from my address before replying directly to me.
>
>klingela at nt dot com
>
>

What you'll have to do is to write an on-insert trigger in which you perform an insert yourself into the table(s) your view is based on. The on-insert trigger fires at commit-time, so what you probably want to do is write a validation trigger in which you check for record uniqueness before navigating to another record.

In case you also want to do updates and deletes you'll have to write an on-lock trigger that locks the row which you're updating (and also checks it isn't locked already by another user) with a 'select...for update nowait', and also an on-delete and on-update trigger to perform the actual delete/update on the table your view is based on.

--
Wessel van Alphen.
Please remove all X's from my E-mail account when replying.
Received on Tue Mar 31 1998 - 00:00:00 CEST

Original text of this message