PRB: "Alias K Not Found" with Application Generated by FoxApp

ID: Q95234

The information in this article applies to:

SYMPTOMS

If you have selected 11 or more databases when you are using FoxApp to generate an application, the error message "Alias 'K' not found" occurs when the application is run.

CAUSE

The section of the FoxApp program generator that sets up database relations converts the work area numbers to letters when writing the code to the SCAFFOLD.PRG file. Work areas 1-10 can be selected according to letters A-J or numbers 1-10; however, work areas 11-25 can be selected only according to their corresponding numbers.

RESOLUTION

Use one of the following two solutions:

Solution 1

Modify the project created by FoxApp to reflect the work area number rather than the letter for the work areas larger than K.

1. In the Command window, issue the following command:

      MODIFY PROJECT <name of app>.PJX

2. Scroll down the list of files to SCAFFOLD.PRG. Select it and press ENTER
   to edit the file.

3. From the Edit menu, choose Find to find and replace "SELECT K" with
   "SELECT 11".

4. Repeat step 3 for each of the remaining databases.

5. Press CTRL+W to save and close the file.

6. In the Project Manager, select the Rebuild Application option.

Solution 2

Modify FOXAPP.PJX so that the change will be permanent and in effect for any further applications developed with FoxApp.

1. In the Command window, issue the following command:

      MODIFY PROJECT <drive>:\<FoxPro_directory>\FOXAPP\FOXAPP.PJX

2. Scroll the list of files to find the screen set, APPSCX. Select it and
   press ENTER to edit APPSCX.

3. Double-click the Generate button. Select the Valid clause check box.
   Choose the Edit button and then choose the OK button.

4. From the Edit menu, choose Find and find the string "<<CHR(i+64)>>"
   (without the quotation marks). Change this string to "<<i>>" (without
   the quotation marks).

5. Press CTRL+W to save changes and close the Valid procedure.

6. Press CTRL+W to save changes and close the APPSCX screen.

7. In the Project Manager, select the Rebuild Application option. The

   destination directory of FOXAPP.APP must be the root FoxPro directory
   (<FoxPro_directory>\FOXAPP.APP).

8. Regenerate the application by issuing the following command:

      DO \<FoxPro_directory>\FOXAPP.APP

Additional reference words: FoxDos 2.00 scaffold set relation 2.50 errmsg err msg KBCategory: kbprg kberrmsg kbprb KBSubcategory:

Last Reviewed: April 17, 1995