[fpc-pascal] Why TSdfDataSet doesn't simply return FCurRec as RecNo?
Michael Van Canneyt
michael at freepascal.org
Thu Oct 30 16:34:11 CET 2014
On Thu, 30 Oct 2014, Michael Van Canneyt wrote:
>
>
> On Thu, 30 Oct 2014, Luca Olivetti wrote:
>
>> Hello,
>>
>> TFixedFormatDataSet (ancestor of TSdfDataSet) overrides GetRecNo
>> (correct) but it does a strange contortion instead of simply returning
>> FCurRec:
>>
>> function TFixedFormatDataSet.GetRecNo: Longint;
>> var
>> BufPtr: TRecordBuffer;
>> begin
>> Result := -1;
>> if GetActiveRecBuf(BufPtr) then
>> Result := PRecInfo(BufPtr + FRecInfoOfs)^.RecordNumber;
>
> The records in the buffer may be in a different order than they are displayed
> in the grid.
Forget this. I was too quick to respond.
I have done some digging, but cannot find a reason for the current behaviour.
Michael.
More information about the fpc-pascal
mailing list