Club Delphi  
    Paypal   FTP   CCD     Buscar   Trucos   Trabajo   Foros

Retroceder   Foros Club Delphi > Bases de datos > Firebird e Interbase
Registrarse FAQ Miembros Calendario Guía de estilo Temas de Hoy

 
 
Herramientas Buscar en Tema Desplegado
  #6  
Antiguo 09-01-2008
Avatar de duilioisola
[duilioisola] duilioisola is offline
Miembro Premium
 
Registrado: ago 2007
Ubicación: Barcelona, España
Posts: 1.806
Poder: 22
duilioisola Es un diamante en brutoduilioisola Es un diamante en brutoduilioisola Es un diamante en bruto
http://www.firebirdsql.org/pdfmanual...ator-Guide.pdf
Página 7

Cita:
Generators and transactions
As said, generators live outside of transaction control. This simply means you cannot safely
“rollback” generators inside a transaction. There may be other transactions executing at the same time
that change the value while your transaction runs. So once you have requested a generator value, consider
it as “gone forever”.
When you start a transaction and then call a generator and get a value of – let's say – 5, it will remain
at that value even if you roll back the transaction (!). Don't even think of something like “OK, when
I rollback, I can just do GEN_ID(mygen,-1) afterwards to set it back to 4”. This may work most of the
time, but is unsafe because other concurrent transactions may have changed the value in between. For
the same reason it doesn't make sense to get the current value with GEN_ID(mygen,0) and then increment
the value on the client side.
Los generadores trabajan fuera de las transacciones, por lo que puede darse el caso de que haya pasado por el Trigger Before, incrementado el valor y luego haya generado una excepción que no ejecute el trigger After.

No es necesario ningún corte de corriente ni nada especial para generar este error.
Responder Con Cita
 



Normas de Publicación
no Puedes crear nuevos temas
no Puedes responder a temas
no Puedes adjuntar archivos
no Puedes editar tus mensajes

El código vB está habilitado
Las caritas están habilitado
Código [IMG] está habilitado
Código HTML está deshabilitado
Saltar a Foro

Temas Similares
Tema Autor Foro Respuestas Último mensaje
ayuda sobre trigger (disparadores) gabrielflowers PHP 9 20-10-2007 01:43:43
ERROR ORA-04082: referencias NEW u OLD no permitidas en disparadores a nivel de tabla Jose Manuel Oracle 4 27-08-2007 16:07:20
generadores karocs Firebird e Interbase 2 07-07-2006 19:29:11
¿Pueden tener disparadores (triggers) las vistas “Union”? Al González Firebird e Interbase 1 19-05-2006 22:29:26
Zeos y disparadores xerkan Firebird e Interbase 1 23-09-2003 10:49:54


La franja horaria es GMT +2. Ahora son las 06:35:36.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.
Traducción al castellano por el equipo de moderadores del Club Delphi
Copyright 1996-2007 Club Delphi