PRB: "Variable <Index Key> Not Found" with SET FIELDS GLOBAL

Last reviewed: June 27, 1995
Article 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 <field list> command and a SET FIELDS GLOBAL command, the following error message occurs:

     Variable <index key> not found

CAUSE

The field list does not contain the index KEY field.

RESOLUTION

Add the KEY field to the SET FIELDS TO <field list> command.

MORE INFORMATION

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 <table1> is the name of a .DBF file:

          USE <table1>
    

  2. In the Command window, issue the following command:

          SELECT 0
    

  3. In the Command window, issue the following command, where <table2> is the name of a .DBF file:

          USE <table2>
    

  4. In the Command window, issue the following commands:

          INDEX ON <key field> TAG key
          SET ORDER TO key
          SELECT <table1>
          SET FIELDS GLOBAL
          SET FIELDS TO <field list> && Do not include the KEY field
          SET RELATION TO <key field> INTO <table2>
    


Additional reference words: FoxDos FoxWin 2.60 errmsg
KBCategory: kbprg kberrmsg kbprb
KBSubcategory: FxprgGeneral


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: June 27, 1995
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.