Insert/Append and KeyGenerator
Posted: Mon 26 Jan 2015 13:31
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;
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;