BUG: ODBC Date Filter Greater Than 12/31/1999 Return No RecordsLast reviewed: March 20, 1998Article ID: Q176572 |
The information in this article applies to:
SYMPTOMSA SQL query through the Microsoft Visual FoxPro driver (Vfpodbc.dll) that specifies a date greater than 12/31/1999 in the WHERE statement does not return any records.
RESOLUTIONHere are three workarounds:
STATUSMicrosoft has confirmed this to be a bug in the Microsoft products listed at the beginning of this article. We are researching this bug and will post new information here in the Microsoft Knowledge Base as it becomes available.
MORE INFORMATIONNOTE: This problem only occurs when you attempt to connect from a client other than Microsoft Visual FoxPro through ODBC to a Microsoft Visual FoxPro database. This problem specifically deals with the ODBC escape sequence dates. For example:
{d '2000/01/01')NOTE: This format works correctly for any dates less than 01/01/2000.
Steps to Reproduce Behavior
DRIVER=Microsoft Visual FoxPro Driver;BACKGROUNDFETCH=NO; SOURCETYPE=DBF; SOURCEDB=C:\MYPATH
SELECT * FROM TEST WHERE MyDate BETWEEN ; {d '01/01/1996'} and {d '01/01/2000'} This query returns the one record that matches the criteria:
SELECT * FROM TEST WHERE MyDate BETWEEN ; {d '01/01/1996'} and {d '12/31/1999'} NOTE: If the application you are using does not support multi-line SQL statements without a line continuation character, please make sure to insert the appropriate line continuation character after the word BETWEEN in both SQL statements.
|
Additional query words: Date
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |