Microsoft KB Archive/123707

{| = BUG: dBASE .FMT with "colo" in Message Migrates Erroneously =
 * width="100%"|

ID: Q123707

The information in this article applies to:


 * Microsoft FoxPro for Windows, versions 2.6 and 2.6a
 * Microsoft FoxPro for MS-DOS, versions 2.6 and 2.6a

SYMPTOMS
When converting a dBASE IV Form Code File (.FMT) that contains a "colo" text string in the Message clause of a GET field to FoxPro .SCX format, the following behavior occurs:

 In FoxPro for MS-DOS, when you edit the converted file, FoxPro terminates with a general protection (GP) fault.  In FoxPro for Windows the .FMT file can be edited and generated into a .SPR but "colo" is interpreted as COLOR clause and is converted as such. This will produce the following error message when the converted screen is Run: Program Error Unrecognized phrase/Keyword in command 

CAUSE
If the Text String of a Message clause for a GET field in the .FMT file contains "colo," then during conversion FoxPro falsely interprets it as COLOR clause and modifies it as following:


 * All the text before "colo" is assigned to the MESSAGE clause without an UnQuote.
 * The text "colo" along with the character immediately following "colo" is converted to the word COLOR.
 * The next eight characters are erroneously associated to the created COLOR clause and the rest of the text is ignored.

For example, if the .FMT file contains this code: "@ 2,10 GET Address PICTURE "@S68 XXXX" ;  MESSAGE "Use semicolons for carriage returns" The conversion process converts it to look like this:   @ ...... GET ADDRESS.......PICTURE "XXXX";   MESSAGE "Use semi ; COLOR or carri

RESOLUTION
Here are three possible workarounds:

 Do not use "colo" as part of the Message clause text for a GET field in the dBASE .FMT file. If you have to use it, add it after the .FMT file is converted to the FoxPro format. -or- In FoxPro for Windows, generate a .SPR file. Then edit it by using the "MODIFY COMMAND|FILE" command to modify the MESSAGE and the COLOR clauses for the GET field changed by the conversion. -or-  In FoxPro for MS-DOS, call GENSCRN.PRG directly to generate a .SPR file for the .SCX file, created when the dBASE IV .FMT file was converted. For more information about how to do this, please see the following article in the Microsoft Knowledge Base: ARTICLE-ID: Q96290 TITLE    : Generating Screen Code by Directly Calling GENSCRN.PRG

Once the .SPR file is created, edit it by using the MODIFY COMMAND|FILE command to modify the MESSAGE and the COLOR clauses for the GET field changed by the conversion. 

STATUS
Microsoft has confirmed this to be a problem in the Microsoft products listed at the beginning of this article. We are researching this problem and will post new information here in the Microsoft Knowledge Base as it becomes available.

MORE INFORMATION
To see the result of this problem:


 * Look at the .SPR file generated for the converted .FMT file.
 * Open the .SCX file, created by the conversion process for the .FMT file, as a Table. Then look at the "Message" and "Colorpair" fields of the record that contains information for the Get field (Objtype=15 and Expr="Address").

Steps to Reproduce Problem
1. Create a dBASE IV FORM that contains a GET field that uses the following

text for the Message clause:

Use semicolons for carriage returns.

If you do not have dBASE IV, create a text file containing code similar to the following code, and save it with a .FMT extension:

@ 2,10 GET Address PICTURE "@S68 XXXX" ; MESSAGE "Use semicolons for carriage returns" 2. Start FoxPro for MS-DOS, and follow these steps: a. Choose the "Convert dBASE files..." option from the RUN menu.

b. If the .FMT file created in step 1 is not displayed in the Select box of the Convert Files dialog, use the Directory push button to find the file.

c. Select one of the .FMT files. Then choose the Process push button.

d. Once the .FMT file is converted and a .SCX file is created, close the Convert Files dialog.

e. Use the "Modify Screen..." command to EDIT the .SCX file you created. C. Start FoxPro for Windows, and follow these steps: a. Choose the "Convert dBASE files..." option from the RUN menu.

b. If the .FMT file created in step 1 is not displayed in the Select box of the Convert Files dialog, use the Directory push button to find the file.

c. Select one of the .FMT files. Then choose the Process push button.

d. Once the .FMT file is converted and a .SCX file is created, close the Convert Files dialog.

e. Use the "Modify Screen..." command to edit the .SCX file you created. When the FoxPro Transport dialog comes up, choose the Transport and Open push button with Transport Objects From set to FoxPro for MS-DOS/UNIX.

f. Generate the screen to create a .SPR file.

g. Run the Generated screen. Additional reference words: FoxWin FoxDos 2.60 2.60a buglist2.60 buglist2.60a GPF migrate convert migration KBCategory: kb3rdparty kbbuglist KBSubcategory: FxinteropDbase
 * }