Ver Mensaje Individual
  #2  
Antiguo 03-09-2003
Avatar de kinobi
kinobi kinobi is offline
Miembro
 
Registrado: may 2003
Posts: 2.621
Reputación: 26
kinobi Va por buen camino
Hola,

Cita:
Posteado originalmente por guillotmarc
¿ Que ocurre si falla una instrucción en el trigger ? ¿ se echa atrás la transacción ? ¿ finaliza el trigger, pero sin cancelar la transacción ?.
según la documentación, yo entiendo que se deshacen las operaciones que se hayan hecho dentro del trigger y ... nada más.

"Errors and exceptions that occur in triggers may be handled using the WHEN statement. If an exception is handled with WHEN, the exception does not return a message to the application and does not necessarily terminate the trigger.

Error handling in triggers works the same as for stored procedures: the actions performed in the blocks up to the error-handling (WHEN) statement are undone and the statements specified by the WHEN statement are performed.
"

-- Data Definition Guide, capítulo 10 (Working with triggers, Error handling in triggers).

Saludos.
Responder Con Cita