Re: Forms4.5:Problem in Querying,please help
Date: Tue, 18 Aug 1998 23:12:25 +0200
Message-ID: <35D9EE39.C6820E7A_at_netcologne.de>
Hi Sonia,
use in the upper block only a Control-Block (means a block without basetable). Then you have no DML-problems in the first block. The second block is the basetable-block and still works as child-block.
BLOCK1: Name 'CONTROL' non-basetable-block ITEMS: ID, CITY, REMARK, ... TRIGGER: When-New-Item-Instance (see below) on block-level
------------------------------------------------------------------------
BLOCK2: Name 'ALL_CITIES' basetable-block on 'ALL_CITIES' ITEMS: ID, CITY, REMARK, ... TRIGGER: Pre-Query (see below) on block-level
------------------------------------------------------------------------
Create a When-New-Item-Instance on BLOCK-LEVEL for BLOCK1. Write:
DECLARE
l_itemname VarChar2 (61) := :System.Cursor_Item;
BEGIN
default_value ('TRUE', 'global.Query_allowed');
IF :global.Query_allowed = 'FALSE' THEN
:global.Query_allowed := 'TRUE';
ELSE
:global.Query_allowed := 'FALSE';
Go_Block ('Block2'); DO_KEY ('Execute_Query'); Go_Item (l_itemname);
END IF;
END ; Create a Pre-Query-Trigger on BLOCK-LEVEL for BLOCK2. Write :ALL_CITIES.City := :CONTROL.City;
:ALL_CITIES.another_item := :CONTROL.another_item; ...
With these two triggers you have the both Blocks synchronized which each other.
One teardrop: Each time you go off an item in the control block, you have a query in the basetable-block. For this problem there is still an answer, but itīs to heavy for now.
Have a nice day
Gerd Volberg
Opitz&Partner GmbH
(+49) 2261 60010
Received on Tue Aug 18 1998 - 23:12:25 CEST