PRB: Err: "Variable Not Found" Attempting to Export

Last reviewed: April 16, 1997
Article ID: Q166934
The information in this article applies to:
  • Microsoft Visual FoxPro for Macintosh, version 3.0b

SYMPTOMS

When attempting to export the fields from a table to another table or another format, you may get the following message:

   Variable <some variable name> is not found.

The variable name referenced is probably not in any of the source tables.

CAUSE

Visual FoxPro is creating the COPY TO command incorrectly. It is truncating the list of fields and then adding the appropriate keyword for the export file type to the end of the command line (for example, DBF).

RESOLUTION

Edit the COPY command that is echoed to the Command window so that it correctly lists the fields.

-or-

If you are trying to copy all fields from a single table, do not use the "Fields" option in the Export Options dialog box. The Export dialog box (and COPY TO command) copy all fields, by default.

-or-

If you are using multiple tables, create a query to create the new file.

STATUS

Microsoft is researching this problem and will post new information here in the Microsoft Knowledge Base as it becomes available. This works correctly in FoxPro 2.6a for Macintosh.

MORE INFORMATION

Steps to Reproduce Behavior

  1. Open both the customer and orders table (located in the Samples:Data folder in the Visual FoxPro folder.

  2. Select Export from the File menu.

  3. Type "TEST" (without the quotes) in the "To:" text box.

  4. Click Options to display the Export Options dialog box.

  5. Click Fields to display the Field Picker dialog box.

  6. Select "customer" in the "From Table" pop-up list. Click All to select all the fields from the customer table.

  7. Select "orders" in the "From Table" pop-up list. Click All to select all the fields from the orders table.

  8. Click OK in the Field Picker dialog box.

  9. Click OK in the Export Options dialog box.

  10. Click OK in the Export dialog box.

The following error occurs:

   Variable 'TO_NAMEDBF' is not found.

Note that this field does not exist in either table. ("DBF" is appended to the end of the command to represent the type of the file being created.) Also note that the field list is not complete.


Keywords : FxprgGeneral kbprg VFoxMac
Version : 3.00b
Platform : MACINTOSH
Issue type : kbprb


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: April 16, 1997
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.