ADO FILTER , BOOLEAN EXPRESSION
Posted: Thu Aug 16, 2018 9:16 am
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
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