Subject Re: [firebird-support] Stored Pro
Author Ann W. Harrison
At 09:16 PM 12/5/2004, shann0n110yd wrote:

> > I understand that using triggers
> > offers me transaction safety, ie if one of the triggers in the process
> > fails, the whole transaction will be rolled back - am I unable to do
> > this with SPs?

Stored procedures are the same - if any part of a stored
procedure fails (absent error handling) all parts and all
stored procedures it calls are undone. Stored procedures
are (absent error handling) atomic. As are triggers.

> I guess what I'm wondering is: what will triggers give
> > me that stored procedures won't?

A single place to put all the rules concerning a single
table. In short, if you find you're putting the same
code in more than one stored procedure, it's time to
use triggers - or modularize your procedures.

Regards,


Ann