Re: Modify block-definition in SQL*FORMS

From: <stroup_at_aspen.ops.lmsc.lockheed.com>
Date: Mon, 19 Oct 92 15:49:26 GMT
Message-ID: <1992Oct19.154926.8793_at_enterprise.rdd.lmsc.lockheed.com>


>In article <dewey-191092082906_at_sebastian.centerline.com>,
>dewey_at_centerline.com (Devan F. Dewey) writes:
>

In article <s897336.719471561_at_rubicon>, s897336_at_rubicon (Soh Lip Meng-Master) wrote:
>>
>> Can any netter teach me how to modify the JOIN-condition in the Block-definition( SQL*FORMS design ) ?
>> To be specfic, my problem is that I could only find the JOIN-condition specification column in the DEFAULT-BLOCK, but not in the MODIFY for the BLOCK-definition!

>You could modify the join condition in the .inp file (if you're using V3),
>but the reason that it is only available in the default block definition is
>that when you commit the default detail block, SQL*Forms write a whole
>bunch of triggers for you to coordinate the two blocks.
 

>SQL*Forms does not have any way to re-write the triggers it built if you
>were to change the join.
 

>Suggestion. Create a new default detail block, and throw the old one away.
 

>(Also, keep this in mind in the future when your in the design phase :-)).

When you specify a master-detail relationship in the default block, SQL*Forms writes several triggers and procedures to handle the block coordination. (These are documented in the SQL*Forms guide in the "Blocks" section. Using forms, you can modify the procedures and triggers if necessary.

But, if all you are doing is changing the fields you are using in your join, then that info is handled using the Enforce foreign key field attribute. All you have to do is:

	If adding a new field, add it to both the master and detail blocks,
        set the field in the detail block to no input, no echo and fill in the
        Enforce foreign key attribute with the name of the matching field in the
        master block (does this make sense?).

	If you are joining against a different field, clear the Enforce foreign
        key attribute for the current joining field, and fill it in for the new
        joining field.

You shouldn't have to modify any of the procedures or triggers!

P.S. Be careful when you drop blocks and add new ones. While the block level triggers will be dropped when you drop a block, form level triggers and procedures may still reference the missing block and you'll have to go in and edit them!

                                Hope this helps,

                                                judie Received on Mon Oct 19 1992 - 16:49:26 CET

Original text of this message