Use DBF() Function w/ Cursor Alias to Find Physical File Name

Last reviewed: June 27, 1995
Article ID: Q125607
The information in this article applies to:
  • Microsoft FoxPro for Windows, version 2.6a
  • Microsoft FoxPro for MS-DOS, version 2.6a
  • Microsoft FoxPro for Macintosh, version 2.6a

In the CREATE CURSOR and SELECT INTO CURSOR commands you provide a name for the cursor. This name is the ALIAS for the table created, while the actual (physical) file name is randomly generated.

Certain operations require the physical file name of the cursor. To return the physical file name, use the DBF() function with the cursor's ALIAS as the argument. For example this command:

   APPEND FROM <cursor_alias>

returns this error:

   "File <cursor_alias> does not exist".

However, the following command works correctly:

   APPEND FROM DBF('<cursor_alias>')


Additional reference words: FoxWin FoxDos FoxMac 2.60a
"File does not exist"
KBCategory: kbprg kbcode
KBSubcategory: FxprgSql


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.