Project JEDI - Issue Tracker
Mantis Bugtracker

Viewing Issue Simple Details Jump to Notes ] View Advanced ] Issue History ] Print ]
ID Category Severity Reproducibility Date Submitted Last Update
0005256 [JEDI VCL] 00 JVCL Components minor always 2010-05-30 13:00 2011-06-10 16:10
Reporter ormada View Status public  
Assigned To AHUser
Priority normal Resolution fixed  
Status resolved   Product Version 3.39
Summary 0005256: TJvMemoryData.Filter
Description i use Jedi 3.3.9 and component TJvMemoryData
when i using simple filter like f1=1 its work fine
but if i use something contains OR its work incorrect
example
ds.Filter:='id=1 or id=2 or id=3';
ds.Filtered;=True;
after that operation we have ONLY first record (id=1 condition)
i try use QuotedStr but with integer type its not working
i mean
ds.Filter:='id='+QuotedStr('1')+' or id='+QuotedStr('2')+' or id='+QuotedStr('3');
i try use "|" insted "OR" but have same result
also i try add "(" and ")" for expression but its not help
    ds.Filter:='(id=1 | id=2 | id=3)';
Additional Information
Tags No tags attached.
Attached Files

- Relationships

-  Notes
(0017425)
AHUser (developer)
2010-05-30 15:09

You have to use parentheses for every expression:

ds.Filter:='(id=1) or (id=2) or (id=3)';


Not that this is SQL-92 compliant but it follows the Pascal-syntax.
(0017426)
ormada (reporter)
2010-05-30 19:54

thanks AHUser!
i really think if its inherited from TDataSet
its must work like TDataSet

from help
----------------------
Description
Use Filter to specify a dataset filter. When filtering is applied to a dataset, only those records that meet a filter’s conditions are available. Filter describes the filter condition. For example, the following filter condition displays only those records where the State field is 'CA' or 'MA':

State = 'CA' or State = 'MA'
(0017467)
AHUser (developer)
2010-06-07 17:16

We now support the "pascal like" filter and the "dataset like" filter. It can be changed by setting the new UseDataSetFilter property.

- Issue History
Date Modified Username Field Change
2010-05-30 13:00 ormada New Issue
2010-05-30 13:01 ormada Issue Monitored: ormada
2010-05-30 15:09 AHUser Note Added: 0017425
2010-05-30 15:09 AHUser Status new => feedback
2010-05-30 19:54 ormada Note Added: 0017426
2010-06-07 17:01 AHUser Assigned To => AHUser
2010-06-07 17:16 AHUser Note Added: 0017467
2010-06-07 17:16 AHUser Status feedback => resolved
2010-06-07 17:16 AHUser Fixed in Version => Daily / SVN
2010-06-07 17:16 AHUser Resolution open => fixed
2011-06-10 16:10 obones Fixed in Version Daily / SVN => 3.40


Mantis 1.1.6[^]
Copyright © 2000 - 2008 Mantis Group
Powered by Mantis Bugtracker