Re: Problems in olsqlforms30 and OCI (in C)

From: marc.colten <colten_at_cbnewsb.cb.att.com>
Date: Tue, 8 Sep 1992 12:25:38 GMT
Message-ID: <1992Sep8.122538.14511_at_cbfsb.cb.att.com>


In article <1992Sep7.115156.1307_at_hermes.dlogics.com>, dlm_at_hermes.dlogics.com writes:
> In article <1992Sep3.163521.26698_at_cbfsb.cb.att.com>,
> colten_at_cbnewsb.cb.att.com (marc.colten) writes:
> > [...]
> >
> > 3) Can you do a query on a detail block and have the relevant
> > information come up in the master block? It works fine
> > the other way. I do a query in a master block and it brings
> > up two records in the detail (which it should). I've tried
> > doing the reverse and it won't work.
> >
> > Is this possible?
> >
> It is possible, but in very limited conditions. The limitation is that you must
> have only one master corresponding to the set of retrieved detail rows. If you
> query the detail on some non-key attribute, you will retrieve rows which may
> correspond to several different masters. In this case, which master shall you
> display? You might say, "all of them", but there is no key-enforcement
> mechanism in sqlforms that can do that; to query the master as if it were a
> detail, you will need just ONE key to enforce.
>
> If this limitation is okay with you, then just write triggers that treat
> KEY-ENTQRY and KEY-EXEQRY in the detail exactly as if they are in the master,
> but with the block associations reversed. Sqlforms will not generate this
> relationship in the default-block display.

I believe I've already tried this. The problem is, the trigger calls functions that are geared to the master-detail relationship going one way. I haven't been able to find equivalences to "clear-<master>-details" or "query-<master>-details".

If I do a "go_block(master)" and then a query, it wipes out the values of the master block and waits for input. I can't find a function that takes the current values and runs with them.

marc colten Received on Tue Sep 08 1992 - 14:25:38 CEST

Original text of this message