I think I see what is going on here. From the trace it appears that Manifold does initial insert statements, one for each record. This would cause my rigger to fire once for each inserted record, which is the expected behaviour. Then Manifold issues update statements for each inserted record where it updates the values each of the columns, which in this case, destroys what my trigger updated on the initial inserts. I noticed that when I initially exported the drawing from Manifold to SQL Server, it created two triggers: [TableName]_ins [TableName]_upd When I disabled the "ins" trigger that Manifold created, and performed the multi-record insert through Manifold, my trigger worked as expected! The "ins" trigger that Manifold created, sets the value of the Version column to zero when a new record is inserted. I can combine this into my insert trigger so that this requirement is upheld.
"The blessing in life is finding the torture you are comfortable with." - Jerry Seinfeld, 6/26/2013 |