Subject | Re: [IBO] BufferSynchroFlags don't work |
---|---|
Author | Helen Borrie |
Post date | 2001-10-20T14:26:02Z |
At 03:22 PM 20-10-01 +0200, you wrote:
...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
_______________________________________________________
>I have latest IBO 4.2 evaluation version. I have the same problem. I'm usingOK, 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.
>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 ?
...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
_______________________________________________________