hi it seems that i can’t filter a TdaMemDataset on empty string fields…
so something like:
var s:=‘’;
tda.filter = ‘(fieldthatcontainssomething=’+quotedstr(‘thisisit’)+‘) AND( fieldthatisemptystring=’+quotedstr(s)+‘)’;
expected behavior or?
hi it seems that i can’t filter a TdaMemDataset on empty string fields…
so something like:
var s:=‘’;
tda.filter = ‘(fieldthatcontainssomething=’+quotedstr(‘thisisit’)+‘) AND( fieldthatisemptystring=’+quotedstr(s)+‘)’;
expected behavior or?
Hi,
this works for me:
tda.filter = '([fieldthatcontainssomething]="thisisit") and ([fieldthatisemptystring]=""])';
tda.filter = '([fieldthatcontainssomething]=''thisisit'') and ([fieldthatisemptystring]=''''])';
so single or double quotes should work?
so QuotedStr() should also work right?
Hi,
yes
yes.
this code works for me too:
DAMemDataTable1.Filter := 'item2 = ' + QuotedStr('');
Yoiu can check TDAMemDataTable filters (Delphi) article