ID: Q119283
2.5x 2.60 | 2.5x 2.60
WINDOWS | MS-DOS
kbprg kbprb
The information in this article applies to:
The error message "File <name>.prg not found" appears with random program names not found; for example, "File a.prg not found."
If the application was created by FoxApp, this error occurs because the APPCTRL screen uses a macro substitution variable called mname, and the database that the application is built upon contains a field named MNAME.
There are two ways to solve this problem:
Edit the screen set and change the variable name from mname to m.mname.
To do this:
1. Close the screen if it is still running, and type the following command
in the Command window:
MODIFY PROJECT <project_name>
2. If a screen set is not listed, choose the Add button and add the
APPCTRL.SCX file. If a screen set is listed, double-click the screen
set.
The Edit Screen Set dialog box will appear.
3. Select APPCTRL and choose the Edit button.
4. In the APPCTRL.SCX Screen Design window, double-click the Search button.
This will open the Push Button dialog box. Choose the Valid button. A DO
CASE statement will be shown. Scroll down to the following section:
CASE act3 = 5
IF !regen
mname = 'appsrch.prg'
ELSE
mname = 'appsrch.spr'
ENDIF
DO (mname)
5. Change the DO CASE statement to look like the following by adding "m."
(without the quotation marks) to the three mname references:
CASE act3 = 5
IF !regen
m.mname = 'appsrch.prg'
ELSE
m.mname = 'appsrch.spr'
ENDIF
DO (m.mname)
6. Save the changes and rebuild the project.
Rename the MNAME field in the database to some other name; for example, use MIDDLE for the field name instead of MNAME.
1. In the Command window, issue the following commands:
USE tutorial\salesman
MODIFY STRUCTURE
The Table Structure dialog box will appear.
2. Locate the field called ONO. Change the name of the field to MNAME.
3. In the Command window, type:
DO foxapp.app
4. In the FoxPro Application Generator dialog box, choose the From File
button, locate the SALESMAN database that contains the MNAME field, and
then choose the Open button.
5. In the FoxPro Application Generator dialog box, choose the Generate
button. This builds the menu and screens.
6. Save the application with the name SALESMAN.APP.
7. Run the application by pressing any key. Once the screen is running,
choose the Search button.
The following error messages will appear:
File 1.prg does not exist
Source: do (mname)
Additional reference words: FoxDos FoxWin 2.50 2.50a 2.50b 2.60 named
KBCategory: kbprg kbprb
KBSubcategory: FxprgMacrosub
Keywords : FxprgMacrosub
Version : 2.5x 2.60 | 2.5x 2.60
Platform : MS-DOS WINDOWS
Last Reviewed: May 1, 1996