Microsoft KB Archive/249336

= BUG: Error Message When Using Date in Index File =

Article ID: 249336

Article Last Modified on 10/15/2002

-

APPLIES TO


 * Microsoft Visual FoxPro 6.0 Professional Edition

-



This article was previously published under Q249336



SYMPTOMS
When an index key expression contains a date in non-strict date format and SET STRICTDATE TO is set to 1, opening or setting the order on the table may result in the following error:

Index does not match the table. Delete the index and re-create the index file.



CAUSE
This problem may arise if you convert code from a version of FoxPro that did not have the STRICTDATE functionality.



RESOLUTION
As a workaround, make sure the date is entered in strict date format. In this case, the index expression would read: ddate-{^1910-10-01}



STATUS
Microsoft has confirmed that this is a bug in the Microsoft products that are listed at the beginning of this article.



Steps to Reproduce Behavior
 From the Tools menu, choose Options. In the Options dialog box, click the General tab. Under the "Year 2000 Compliance" section, change the Strict Date Level to 0-Off. Press the Set As Default button, and the close the dialog box. Create a table with a date field, named ddate, and a character field named first. Add some data to both fields. For this example, make sure all the dates have a year after 1990.  Create an index tag named dtest with an expression like this: ddate-{10/01/1910}   Save the index, and set the order to the tag you just created with the following command: SET ORDER TO dtest </li>  Close the table by issuing this command in the Command window: USE From the Tools menu, choose Options. In the Options dialog box, click the General tab. Under the "Year 2000 Compliance" section, change the Strict Date Level to 1-Constants. Press the Set As Default button, and close the dialog box. A Strict Date Level of 1 is the default value in Visual FoxPro 6.0.

</li>  Open the table with this command and the error listed in the Symptoms section appears: USE table_name </li></ol>

Additional query words: KBDSE

Keywords: kbbug kbnofix kbxbase kbcodesnippet kbdatabase KB249336

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.