Board index » delphi » Filterproblem with ADOQuery while mixing AND & OR operators
Mani
![]() Delphi Developer |
Filterproblem with ADOQuery while mixing AND & OR operators2005-10-22 03:30:01 PM delphi197 I try to set a filter on my ADOQuery like this: (Name='John' OR Firstname='John') AND Birthdate>'2005-01-01' When i do this, there comes up an EOleException which tells me that the arguments are from the wrong type. Following is working fine: Name='John' OR Firstname='John') OR Birthdate>'2005-01-01' and this also: (Name='John' AND Firstname='John') AND Birthdate>'2005-01-01' It seems that Delphi has a problem in mixing AND & OR Operators in the filter. I try to use the filter because the there are lots of data and i don't want to open the query each time again if i try to search in it. Same problem if i use another field for Birthday (string) instead of the date-field. Can somebody help me? |