Subject Re: [ib-support] Too many version problem...
Author Svein Erling Tysvær
Fabrice,

I think there is a better way for you to do this. Rather than deactivate
your trigger, check in your trigger if the field is already assigned, i.e.
something like

IF ((NEW.FABRICEFIELD IS NULL) OR (NEW.FABRICEFIELD=0) THEN
NEW.FABRICEFIELD = GEN_ID(GEN_FABRICEFIELD, 1);

rather than just
NEW.FABRICEFIELD = GEN_ID(GEN_FABRICEFIELD, 1);

Those of us using IBO use this in every trigger we write for generating
primary keys, and I haven't heard of any problems with it. Changing
metadata at runtime like you do really isn't recommended.

Regards,
Set

At 17:07 29.03.2001 +0200, you wrote:
>I have a trigger which autogenerate a reference (or for something else).
>When I exchange data between two databases (replication) I need to
>desactivate this trigger when I use "insert" clauses.
>I reactivate it after the exchange.
>
>After 255 "alter trigger XXX active/incative" I have a "two many version"
>problem and I need to backup/restore database....
>
>Why this limit and does somebody plan to correct it ?
>
>Fabrice Vendé.