Subject Re: [IBO] insertSQL Help please
Author stanw1950
--- In IBObjects@yahoogroups.com, Helen Borrie <helebor@t...> wrote:
> At 10:37 PM 8/03/2004 +0000, you wrote:
>
> >Helen,
> >
> >Why even use a trigger if you are using generatorlinks for all your
> >inserts? Or, why use generatorlinks if you are using a trigger? It
> >seems to me that you should only use one or the other, but not
both,
> >or am I missing something?
>
> The trigger implements and enforces a business rule. It ensures
that the
> table can get a PK, regardless of the interface that is used for
inserts.
> It's a design mistake to assume that your application is the only
one that
> will ever insert rows into the tables.
>
> In your particular applications, if you have reasons to want to
know what
> the PK is, then you use generatorlinks. In the typical Delphi
application,
> you *do* want to know, because updates, deletes and refreshes are
> positioned on the PK; and because you often want to form master-
detail
> relationships between sets inside the same transaction context.
>
>
> Helen


That makes sense. Thanks for the explanation.

Stan