Subject Re: [IBO] insertSQL Help please (again)
Author newgen3152003
Helen, what am I doing different with the trigger from before? it
still increments 2.
if I remove generatorlinks
IDLOC=GEN_LOCATIONS_IDLOC
i get an error
Field IDLOC must have a value

what am I doing wrong?
Daniel
--- In IBObjects@yahoogroups.com, Helen Borrie <helebor@t...> wrote:
> At 12:22 AM 9/03/2004 +0000, you wrote:
> >Thanks again Helen,
> >
> >please excuse my lack of knowledge here, but is this how it should
be
> >written?
>
> Yes. Sorry for the typos & omissions on these quick answers.
>
> >SET TERM ^;
> > CREATE TRIGGER FOR LOCATIONS BEFORE INSERT POSITION 0
> > AS BEGIN
> > IF(NEW.IDLOC IS NULL) THEN NEW.IDLOC = GEN_ID
> >(GEN_LOCATIONS_IDLOC,1);
> > END ^
> > SET TERM ;^
> >
> >no need for a trigger name? what does position 0 mean?
>
> It means it will be the first to fire, if you have multiple
triggers for
> that particular phase and operation - you can have as many as you
like.
>
> If you only have one, then POSITION is optional. (you can omit the
POSITION
> clause when you multiple triggers for the same phase/operation, as
> well. Then the triggers will fire in alphabetical order. :-< )
>
> SQL stuff you can find out from the IB 6 manuals - LangRef.pdf.
>
> >Daniel
> >ps the ronan example was just what I needd
>
> Good. I thought it might help. :-)
>
> H.
> >