FOR() Function Returns Index Info in Uppercase LettersID: Q120791 2.60 2.60a | 2.60 2.60a
The information in this article applies to:
SUMMARYThe FOR() function in FoxPro version 2.6 returns the index information in uppercase letters only. The FOR() function was added in the version 2.6 series for compatibility with dBASE. In dBASE, the information returned is in uppercase, lowercase, or a combination of both; it depends on how the text was typed originally when the index was created by using a FOR clause in the INDEX command.
MORE INFORMATIONHere's an example showing how the FOR clause and the FOR() function work. If the index was created by typing the following command in the command window on a database that has a field called name:
this index will show only those records that have the word "Smith" in the
name field.
If you type "? for()" (without the quotation marks) in the command window, FoxPro will display the FOR clause that was used in the INDEX expression. The expression will be in all uppercase letters (NAME="SMITH"). If a FOR clause was not used on the index, the FOR() function returns a null string value. This could cause a problem in cases where code written in dBASE recreates an index based on the condition of the FOR() function. To work around this, you can change the code to:
The index would be then index on the uppercase of the word 'Smith'. Using a
command such as SEEK would still look for the word 'Smith' and not for
Additional reference words: FoxDos FoxWin 2.60 2.60a
KBCategory:
KBSubcategory: FxinteropGeneral
|
|
Last Reviewed: May 22, 1998 © 1999 Microsoft Corporation. All rights reserved. Terms of Use. |