Subject Re: [IBO] Generator values not udpated
Author Ed Dressel
> a) the import utility seems to change (or not to change) the
> current value of the *generator* ?

the import utility gets a new generator value (as posted before). It
is the only place that the ID is accessed.

> b) the imported records are getting stored with their "generatED
> IDs" as they were in the database they were imported from ?

the imported records seem to be getting the correct generated IDs, but
then, after the import, the new generator values is not kept--it
reverts back to its previous value.

For example, it was 130. 50 new records are added, and the records
have ID values values of 131...180. But then, after the import, the
generator is 130.

And I only see this very occasionally--very occasionally. But I have
seen it more then once.

I now check the generator values and IDs after the import, and if the
generator is less then the max ID value, I reset it--it is a work
around, but a bit ugly.

> c) something different to either, e.g. apparently sometimes one,
sometimes the other...
>
> For c), do you have a trigger that would cause this in a situation
where the INSERT statement was going through as null, e.g.
>
>
> if (new.id is null) then
> new.id = gen_id(TheSameGenerator,1);

I have that code in my trigger, but it would never be fired because
the import utility needs the ID for detail records--so I get the ID

I don't know what more I can explain--it doesn't happen very often,
but when it does, it is ugly.

Thanks
Ed Dressel