Subject | Re: [firebird-support] Are before triggers absolutely reliable? What happens if they fail? |
---|---|
Author | Martijn Tonies |
Post date | 2007-10-29T11:11:20Z |
Hello Mitch,
somewhere.
record will not be inserted.
the INSERT to happen.
What is the full source of the trigger?
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
> I have a before insert trigger which includes NEW.DOC_CREATED_DATE =It has to be (2), that is, if you're not turning the trigger inactive
> CURRENT_TIMESTAMP;
>
> 99% of the time this works, but 1% of the time there is a null value.
>
> I assume that there can be only 2 causes. Either 1. the trigger is
> failing or 2. the column is being overwritten somehow after the insert.
somewhere.
> In order to discount #1, would it be true to say that if a triggerIf a trigger raises an error, the client will receive the error and the
> and/or generator fails for some reason that there would be an error
> message and the insert would not occur?
record will not be inserted.
> Can transaction control be used to enforce this at the trigger levelTriggers work in the same transaction as the transaction that caused
> or do transactions only exist in the context of an external application?
the INSERT to happen.
What is the full source of the trigger?
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