At 10:00 PM 4/03/2012, Wolfgang Kluge wrote:
>Thanks for your hint.
>
>On 03/03/2012 08:38 PM, Tomasz Tyrakowski wrote:
>>
>> On 2012-03-03 05:42, Wolfgang Kluge wrote:
>> > [...]
>> > manually created 6 records with IBEasy ver 1.5.3
>> > [...]
>>
>> That's the key in my opinion.
>>
>
>On a re-try under same conditions I checked the value of the generator 
>immediately after adding the last record and found it to be higher than 
>the value of the recorded primary key
>
>The recorded primary key is normal when I added records via SQL commands 
>in DbVisualizer.
>
>Since IBEasy also has a facility to process SQL commands I tried this -  
>no problems then.
>
>The problem of inconsistent generator keys appears only when I use the 
>navigator bar of IBEasy.
>Appears IBEasy has bug in there.

Or perhaps it expects the trigger to be written this way:

CREATE TRIGGER "VI_DETAIL_CREATE_TRG" FOR "VI_DETAIL"
   ACTIVE BEFORE INSERT POSITION 0
   As
   begin
     if (new.VI_DETAIL_RECORD is null) then
       NEW.VI_DETAIL_RECORD = GEN_ID( VI_DETAIL_GEN, 1 );
   end

./heLen


Reply via email to