Subject RE: [IBO] TIBOQUERY filter and CachedUpdates
Author Jason Wharton

Thank you for this.  It was very helpful to me.


What I discovered is you need to use FilterInMem property instead of Filter.

The Filter property puts that filter in the SELECT statement and since cached updates hasn't yet altered the value in the database it won't work properly.

But if you use the FilterInMem property then IBO will parse that filter clause and apply it to the records fetch into the buffer in memory.  This is what you want to use when doing cached updates.

However, I also found that there was a deficiency in the in-memory filter processing logic.  I didn't have support for the IS NULL and IS NOT NULL operators.  Here is a patch to add these operators into the filter processing logic.

IB_Parse.pas approx line 1540

function TIB_FilterValue.GetResult( aRow: TIB_Row ): boolean;


  tmpCol: TIB_Column;

  CmpProc: function ( const A, B: string ): integer;


  tmpCol := aRow[ ColumnIndex ];

  if ( Operation = 'IS NULL' ) then

    Result := tmpCol.IsNull


  if ( Operation = 'IS NOT NULL' ) then

    Result := tmpCol.IsNotNull


  if tmpCol.IsText then


    if fopCaseInsensitive in Owner.BDataset.FilterOptions then

      CmpProc :=



Please let me know if this works for your actual situation or if there is some other aspect this sample app doesn't take into account that you still need addressed.


Kind regards,

Jason Wharton



From: [mailto: ]
Sent: Tuesday, September 05, 2017 1:42 PM
Subject: RE: [IBO] TIBOQUERY filter and CachedUpdates


Ok, I uploaded a 7z file.. I'm sending a zip file...