The information in this article applies to:
SYMPTOMSRunning a parameterized query against a Jet database where the parameter variable is equal to NULL will not return any records. Running a query without the parameter variable that specifically searches for NULL will succeed as expected. CAUSEA variable with a NULL value sent in as the parameter is not equal to what the JET engine recognizes as NULL. The values of the NULLs do not match. RESOLUTION
Before calling the code that executes the query, use an IF statement that
checks the value of the parameter. If the value is NULL, run a different
query that specifically looks for a NULL value, otherwise run the original,
parameterized query.
STATUSThis behavior is by design. MORE INFORMATIONSteps to Reproduce Behavior
Query1 will have one record while Query2 will have no records. Additional query words: kbVBp500 kbVBp600 kbdse kbDSupport kbVBp kbNoKeyWord
Keywords : kbGrpVBDB |
Last Reviewed: February 2, 2000 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |