View Issue Details

IDProjectCategoryView StatusLast Update
0005256JEDI VCL00 JVCL Componentspublic2011-06-10 16:10
ReporterormadaAssigned ToAHUser 
PrioritynormalSeverityminorReproducibilityalways
Status resolvedResolutionfixed 
Product Version3.39 
Target VersionFixed in Version3.40 
Summary0005256: TJvMemoryData.Filter
Descriptioni 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)';
TagsNo tags attached.

Activities

AHUser

2010-05-30 15:09

developer   ~0017425

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.

ormada

2010-05-30 19:54

reporter   ~0017426

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'

AHUser

2010-06-07 17:16

developer   ~0017467

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 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