PRB: "File does not exist" Using Macro Substitution in EXEID: Q132696 The information in this article applies to:
SYMPTOMSRunning an .EXE file on the development machine works, but when that .EXE file is moved out of the development directory or onto another machine, the customer encounters the error "File <filename> does not exist." While investigating the error, it is found that the file was never brought into the project by the Project Manager, so file is missing from the .EXE file.
CAUSEIn any case where macro substitution is used in a command expression that makes a call to another file, the Project Manager skips over that line without adding the file to the Project. For an example, consider the REPORT FORM command. Developers who offer destination options (to print, preview, and so on) often store those options to variables that are then referenced in the REPORT FORM expression by using macro substitution. Here s an example:
In spite of the fact that macro substitution is not used to reference the
REPORT FORM file directly, having it any place in the expression causes
the Project Manager to skip the line and not automatically bring the report
file into the project during a project build. Therefore the file is missing
from the .EXE file.
RESOLUTIONUse either of these resolutions:
STATUSThis behavior is by design.
MORE INFORMATION
Steps to Reproduce BehaviorUsing the Customer database in the Tutorial subdirectory of the main FoxPro directory, build a report named Customer. Create a .PRG file named Test containing the following code:
Create a new project and add the Test.prg program to it. Build the project.
Note that the Customer report form is not brought into the project. If this
project is later built into an .EXE and all required support files are
distributed (ESL, DBF, and so on), the customer can encounter this error:
Additional reference words: FoxWin FoxDos 2.50 2.50a 2.50b 2.60 2.60a
KBCategory: kbprg kbprb kberrmsg
KBSubcategory: FxprgMacrosub
|
|
Last Reviewed: July 31, 1995 © 1999 Microsoft Corporation. All rights reserved. Terms of Use. |