For some reason the following Result check gives True (-1) with the query Insert and False (0) with the query Append. The Insert will get KeyGenerator value and the Append doesn't.
Any known reason for this behaviour?
GeneratorMode is gmInsert and I am doing the Insert and Append for the same TIBCQuery.
function TGDSRecordSet.GetNull(Field: TFieldDesc; RecBuf: IntPtr): boolean;
var
DBObject: IntPtr;
begin
...
if Field.FieldDescKind <> fdkCalculated then
Result := Marshal.ReadInt16(RecBuf, FDataSize + (Field.FieldNo - 1) * SizeOf(Short)) = -1
...
end;
Insert/Append and KeyGenerator
Re: Insert/Append and KeyGenerator
This works in version 5.4.12! We have also noticed a few other very serious problems. Don't have time to figure out those.
Re: Insert/Append and KeyGenerator
Unfortunately, we could not reproduce the issue, the auto-incremental field value is correctly generated after calling both TIBCQuery.Insert and TIBCQuery.Append. Please send a small sample to demonstrate the issue to viktorv*devart*com, including a script to create and fill in the test database object.
Re: Insert/Append and KeyGenerator
I have the same problems. First and second append correctly returns the key from the generator, after that, generator is not called at all. I've checked with dbMonitor, but could not figure it out, what conditions are that cause the call to the generator to be skipped.
I also tried switching from gmPost to gmInsert mode, and it's the same.
Unfortunatelly, I do not have the source code, so I cannot debug it myself.
I also tried switching from gmPost to gmInsert mode, and it's the same.
Unfortunatelly, I do not have the source code, so I cannot debug it myself.
Re: Insert/Append and KeyGenerator
We have already fixed this issue, the fix will be included in the next IBDAC build.