Subject Re: [IBO] DML Caching
Author mkl20uk@yahoo.co.uk
There is something amiss here. There is nothing wrong with the
values being supplied to the KeyLinks columns and if DML caching is
not used it all works fine. The only triggers that impact on the
KeyLinks columns is one. Each table where this occurs has a primary
key of xxx_UNIQUE_REF. Generator links are set up properly. There
is, as a failsafe, a trigger on the table (fired on before insert) of

IF (NEW.xxx_UNIQUE_REF IS NULL) THEN
NEW.xxx_UNIQUE_REF = GEN_ID(NN_SOMEUNIQUE_NAME, 1);

This is there purely in case someone works with the data directly.

It does appear that the generator values for each of the tables where
I use DML caching to announce inserts is becoming corrupted.

Each of the prime keys concerned is an Int64 and the generators under
Delphi6 return Int64 values. If I have a table where DML caching to
announce inserts is not enabled, I can add records and watch the
generator values incrementing quite normally. When I enable DML
caching ro announce inserts, I see the generator values getting
corrupted.

Will DML caching work if there is a trigger on the table to supply a
key value (ie a value for a KeyLinks column) if one isn't supplied by
the application?

Is this a conversion issue with Int64's?

This is using Delphi6, Win2kSP2 and IBO4.2Ea

--- In IBObjects@y..., "Jason Wharton" <jwharton@i...> wrote:
> Then this problem has to do with improperly supplying values to
your KeyLink
> columns or corrupting them in triggers.
>
> >