Subject Re: Trigger problem
Author bossman@i4free.co.nz
--- In ib-support@y..., hans@h... wrote:
> You can't do that. A mandatory COMMIT can only be issued by the
> client, after which the client has to refresh its row or rows.
> Many interfaces do this automatically via a connection ,session
> or table flag. Some of us want to ROLLBACK after many transactions
> and the server automatically rollsback on a procedure/trigger
> failure or lost client connection.
>
> Best Regards
> Hans
>
> ==========================================================
> bossman@i... wrote:
> >
> > Hi folks,
> >
> > Got a table with fields in it. What i'd like to do is to put a
vaue
> > into a field via a trigger (this is fine and can do it).
> >
> > what i want then to do is to do a commit retain so the value that
was
> > just placed to appear on the screen (another words refresh the
view).
> >
> > also how do you use a procedure via a trigger ???
> >
> > I've tried putting a procedrue in there btu no joy either.
> >
> > I'm totally lost on it.
> >
> > Used this one and works!
> > Set ^;
> > create TRIGGER "CUSTS" FOR "CUSTOMERS"
> > ACTIVE BEFORE INSERT POSITION 0
> > AS
> > BEGIN
> > if (new.custnum is null) then
> > New.custnum = gen_id(custnum_id,1);
> > END^
> >
> > set term ;^
> >
> > Error message as per dailog box - IBconsole.
> >
> > Dynamic SQL Error
> > SQL error code = -104
> > Token unknown - line 8, char 11
> > SQL
> > Statement: alter TRIGGER "CUSTS" FOR "CUSTOMERS"
> > ACTIVE BEFORE INSERT POSITION 0
> > AS
> > BEGIN
> > if (new.custnum is null) then
> > begin
> > New.custnum = gen_id(custnum_id,1);
> > EXEC SQL
> > commit retain;
> > end
> > END^
> >
> > set term ;^
> >
> > I have a number of manuals (pdf, text, html and win help files)
but
> > they don't give enough info/samples.
> >
> > any help muchly appreciated.
> >
> > dave.
> >
> >
> > To unsubscribe from this group, send an email to:
> > ib-support-unsubscribe@egroups.com
> >
> >
> >
> > Your use of Yahoo! Groups is subject to
http://docs.yahoo.com/info/terms/