Subject | Re: [firebird-support] New context in After trigger |
---|---|
Author | Martijn Tonies |
Post date | 2008-05-20T11:55:40Z |
Hello Eric,
works after the data has been stored, so you can never adjust a value in the
table via the NEW-context.
Can't this be done in a BEFORE trigger?
Or how about a COMPUTED BY value that's never stored?
Database Workbench - tool for InterBase, Firebird, MySQL, NexusDB, Oracle &
MS SQL Server
Upscene Productions
http://www.upscene.com
My thoughts:
http://blog.upscene.com/martijn/
Database development questions? Check the forum!
http://www.databasedevelopmentforum.com
> This code does not work anymore in 2.1. In 1.5 without problems (nowRight, this obviously fails in an AFTER trigger. Remember, an AFTER triggers
> commented, calculating amounts in app.)
>
>
> BEGIN
>
> -- SELECT DISTINCT POS.BTWPERCENTAGE FROM POS into :FPBTW;
>
> -- New.BedragExcl = ((New.BedragIncl / (100 + :FPBTW)) * 100);
works after the data has been stored, so you can never adjust a value in the
table via the NEW-context.
Can't this be done in a BEFORE trigger?
Or how about a COMPUTED BY value that's never stored?
> END;Martijn Tonies
Database Workbench - tool for InterBase, Firebird, MySQL, NexusDB, Oracle &
MS SQL Server
Upscene Productions
http://www.upscene.com
My thoughts:
http://blog.upscene.com/martijn/
Database development questions? Check the forum!
http://www.databasedevelopmentforum.com