The information in this article applies to:
SYMPTOMSWhen setting the Filter property of an ADO recordset, the following error is returned:
CAUSE
This error can occur if the filter syntax is incorrect. This commonly occurs when using AND and OR operators and grouping clauses with parentheses. Though there is no precedence for AND and OR, the ADO Filter property does not allow you to group OR clauses within parentheses and AND clauses without parentheses.
RESOLUTION
To resolve the problem, rewrite your filter statement to not combine OR clauses grouped within parentheses as parts of a larger AND clause.
Note that the rules of logic result in very different results depending on where you place your AND and OR clauses. Be sure that your two filter statements are logically equivalent.For example, the following filter syntax that returns the error:
is logically equivalent to the following filter syntax that does not cause the error to occur:
STATUSThis behavior is by design. Additional query words:
Keywords : kberrmsg kbADO kbADO150 kbADO200 kbADO201 kbADO210 kbGrpASP kbDSupport kbADO210sp2 |
Last Reviewed: August 16, 1999 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |