In https://svn.code.sf.net/p/zeoslib/code- ... ataset.pas (rev. 4080) there is a bug that prevents filtering of e.g. rxdbgrid on computed columns. For my attemted fix, see below. I dunno if this has been fixed in trunk. BTW: I totally did not understand the magic casting of RowBuffer for GetCalcFields. Seems smelly....
Code: Select all
function TZAbstractRODataset.GetActiveBuffer(var RowBuffer: PZRowBuffer):
Boolean;
//...
if (ResultSet.GetRow = RowNo) or ResultSet.MoveAbsolute(RowNo) then
begin
if (State = dsOldValue) and (ResultSet.
QueryInterface(IZCachedResultSet, CachedResultSet) = 0) then
CachedResultSet.MoveToInitialRow;
FetchFromResultSet(ResultSet, FieldsLookupTable, Fields, RowAccessor);
RowBuffer.Index := RowNo;
// >>>>>>> attempted fix
{$IFDEF WITH_TRECORDBUFFER}
GetCalcFields({$IFDEF WITH_GETCALCFIELDS_TRECBUF}NativeInt{$ELSE}TRecordBuffer{$ENDIF}(RowBuffer));
{$ELSE}
GetCalcFields(PChar(RowBuffer));
{$ENDIF}
// <<<<<<<<<<<<<<<< attemted fix
ResultSet.MoveToCurrentRow;
end
//...
Willibald