Page 1 of 1

ADO FILTER , BOOLEAN EXPRESSION

Posted: Thu Aug 16, 2018 9:16 am
by Franklin Demont
Hello ,

Testing ADO oRs:Field := cExpression

I found some difficulties :

oRS.FILTER := "FIRST='Jon' OR (Married=0 AND LAST LIKE 'D*')"// Accepted
oRS.FILTER := FIRST='Jon' OR Married=0 AND LAST LIKE 'D*'" // NOT ACCEPTED
oRS.FILTER := "(FIRST='Jon' OR Married=0) AND LAST LIKE 'D*'" // NOT ACCEPTED
oRS.FILTER := "LAST LIKE 'D*' AND FIRST='Jon' OR Married=0" // NOT ACCEPTED
oRS.FILTER := "LAST LIKE 'D*' AND (FIRST='Jon' OR Married=0)" // NOT ACCEPTED

Why is only the first expression accepted ? Espacially why the third or fifth not ?

It seems that only the first one is accepted , how do we know where to place ( and ) ?

Frank

Re: ADO FILTER , BOOLEAN EXPRESSION

Posted: Thu Aug 16, 2018 10:42 am
by Marc Vanzegbroeck