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

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 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.

Additional query words:

Keywords : kbprg kbMAC kbVFp FxprgGeneral
Version : MACINTOSH:3.0b
Platform : MACINTOSH
Issue type : kbprb


Last Reviewed: December 10, 1999
© 2000 Microsoft Corporation. All rights reserved. Terms of Use.