Microsoft KB Archive/112319

{| = PRB: "Variable  Not Found" with SET FIELDS GLOBAL =
 * width="100%"|

ID: Q112319

The information in this article applies to:


 * Microsoft FoxPro for Windows, version 2.6
 * Microsoft FoxPro for MS-DOS, version 2.6

SYMPTOMS
When you issue a SET FIELDS TO command and a SET FIELDS GLOBAL command, the following error message occurs:

Variable not found

CAUSE
The field list does not contain the index KEY field.

RESOLUTION
Add the KEY field to the SET FIELDS TO command.

Steps to Reproduce Behavior
NOTE: We recommend that you use the CUSTOMER.DBF and INVOICES.DBF files in the TUTORIAL subdirectory for this example.

1. In the Command window, issue the following command, where is

the name of a .DBF file:

USE 2. In the Command window, issue the following command: SELECT 0 3. In the Command window, issue the following command, where is  the name of a .DBF file:

USE 4. In the Command window, issue the following commands: INDEX ON TAG key SET ORDER TO key SELECT SET FIELDS GLOBAL SET FIELDS TO && Do not include the KEY field SET RELATION TO INTO Additional reference words: FoxDos FoxWin 2.60 errmsg KBCategory: kbprg kberrmsg kbprb KBSubcategory: FxprgGeneral
 * }