Re: Question on triggers before update

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



Hi Simon

For sure triggers have their place and there are many situations where we
need using it. SQL Server 2005 and onwards has a great feature an OUTPUT
command to 'replace' triggers and I think you should look into... Now to
your questions

1) You will have to add some logic to handle open transactions and ROLLBAK
in case of error..
For example if you have an identity property on the column and trigger has
to insert some data into the table but failed so you will see that an
identity value will be increased anyway
2) Yes , in some cases, but you should test it



"Simon Whale" <simon@xxxxxxxxxx> wrote in message
news:u8PISqxHKHA.5256@xxxxxxxxxxxxxxxxxxxxxxx
Hi,

I have a theoretical question on Triggers. The scenario is explained
below.

I want to make a trigger that before an update is triggered that it
records the values that are to be changed into a historical table. hope
the actions that im trying perform make sense

My question is what;

1. will happen to the update if the trigger fails (due to some unforeseen
event!)
2. does this increase overheads significantly

Many thanks
Simon Whale



.



Relevant Pages

  • Re: INSERT Statement with fixed values + one calculated value
    ... Have you looked at the IDENTITY property? ... "Alexander Horak" wrote in message ... > I don't want to use triggers for that, and I prefer database independent ...
    (microsoft.public.vc.database)
  • Re: INSERT Statement with fixed values + one calculated value
    ... Have you looked at the IDENTITY property? ... "Alexander Horak" wrote in message ... > I don't want to use triggers for that, and I prefer database independent ...
    (microsoft.public.data.oledb)
  • Re: INSERT Statement with fixed values + one calculated value
    ... Have you looked at the IDENTITY property? ... "Alexander Horak" wrote in message ... > I don't want to use triggers for that, and I prefer database independent ...
    (microsoft.public.sqlserver.clients)
  • Re: Question on triggers before update
    ... For sure triggers have their place and there are many situations where we ... SQL Server 2005 and onwards has a great feature an OUTPUT ... For example if you have an identity property on the column and trigger has ...
    (microsoft.public.sqlserver.programming)
  • Re: Trigger on a Qfile ... WHAT??
    ... area and concluded that triggers in D3 were not supported well enough ... break functionality which worked previously. ... Find the feature is broken. ... completely ignoring what the rant is about - and completely ...
    (comp.databases.pick)