Author: Tomas Rutkauskas
I am trying to write a function to determine if a given TTable has a restricted
view. The filtered and master-detail views are easy. Is there a way to determine if
SetRange / ApplyRange, etc. have been used for a table? This is for Paradox tables.
Answer:
1 TMyTable = class(TTable)
2 public3 function IsRangeActive: Boolean;
4 end;
5 6 function TMyTable.IsRangeActive: Boolean;
7 begin8 Result := BuffersEqual(GetKeyBuffer(kiRangeStart), GetKeyBuffer(kiCurRangeStart),
9 SizeOf(TKeyBuffer) + RecordSize) and BuffersEqual(GetKeyBuffer(kiRangeEnd),
10 GetKeyBuffer(kiCurRangeEnd), SizeOf(TKeyBuffer) + RecordSize);
11 end;