ADO FILTER , BOOLEAN EXPRESSION

ADO FILTER , BOOLEAN EXPRESSION

Postby Franklin Demont » 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
test
Franklin Demont
 
Posts: 166
Joined: Wed Aug 29, 2012 8:25 am

Re: ADO FILTER , BOOLEAN EXPRESSION

Postby Marc Vanzegbroeck » Thu Aug 16, 2018 10:42 am

Regards,
Marc

FWH32+xHarbour | FWH64+Harbour | BCC | DBF | ADO+MySQL | ADO+MariaDB | ADO+SQLite
Marc Vanzegbroeck
 
Posts: 1159
Joined: Mon Oct 17, 2005 5:41 am
Location: Belgium


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 14 guests