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:
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.
MORE INFORMATION
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
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.
Open the table with this command and the error listed in the Symptoms section appears:
USE table_name
Additional query words: KBDSE
Keywords: kbbug kbnofix kbxbase kbcodesnippet kbdatabase KB249336