ADO FILTER , BOOLEAN EXPRESSION

Post Reply
Franklin Demont
Posts: 166
Joined: Wed Aug 29, 2012 8:25 am

ADO FILTER , BOOLEAN EXPRESSION

Post 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
test
Marc Vanzegbroeck
Posts: 1102
Joined: Mon Oct 17, 2005 5:41 am
Location: Belgium
Contact:

Re: ADO FILTER , BOOLEAN EXPRESSION

Post by Marc Vanzegbroeck »

Regards,
Marc

FWH32+xHarbour | FWH64+Harbour | BCC | DBF | ADO+MySQL | ADO+MariaDB | ADO+SQLite
Post Reply