Subject Re: [IBO] BufferSynchroFlags don't work
Author Helen Borrie
At 03:22 PM 20-10-01 +0200, you wrote:
>I have latest IBO 4.2 evaluation version. I have the same problem. I'm using
>TIBOQuery for test. I have set GeneratorLinks as you suggested and
>BufferSynchroFlags all set to true. After I post record the row still disappears
>from grid. I can see row after refresh but row is not focused.
>After setting GeneratorLinks, ID is now incremented by 2. What can I do ?

OK, your problem here is that you are incrementing your generator twice: once with GeneratorLinks and then again in a Before Insert trigger on the server. You need to change your trigger, so that it gets a generator value ONLY if the new.value is NULL.

...if (new.aValue is null) then
new.aValue = Gen_ID(aGenerator, 1);
..

The problem you have at present is that your application "knows" about the key value returned to your GeneratorLinks; but your new record does not have this key value, it has a value that is one higher than that.

Regards,
Helen

All for Open and Open for All
InterBase Developer Initiative ยท http://www.interbase2000.org
_______________________________________________________