Microsoft KB Archive/112470

{| = PRB: @ ... SAY Command in Format File Causes Extra Column =
 * width="100%"|

ID: Q112470

The information in this article applies to:


 * Microsoft FoxPro for MS-DOS, version 2.6
 * Microsoft FoxPro for Windows, version 2.6

SYMPTOMS
The @ ... SAY command functions differently in a FoxPro format file than in a dBASE IV format file.

CAUSE
FoxPro and dBASE format files differ in functionality. In FoxPro, the BROWSE FORMAT command has been enhanced so that an @ ... SAY command in a format file creates a calculated, read-only field. In dBASE IV, this command is ignored.

If a dBASE IV format file is migrated to FoxPro, extra columns may appear if a BROWSE FORMAT command is then issued using this format file.

RESOLUTION
Remove the @ ... SAY commands unless a calculated field is desired.

Steps to Reproduce Behavior
1. Create a file named CUSTOMER.FMT with the following commands:

@ 1,1 SAY "CNO" @ 1,10 GET cno @ 2,1 SAY "CUSTOMER" @ 2,10 GET company

TIP: As an alternative, combine the corresponding @ ... SAY commands and @ ... GET commands into one command. For example:

@1,1 SAY 'CNO' GET cno @2,1 SAY 'COMPANY' GET company 2. Issue the following commands in the FoxPro Command window: USE tutorial\customer SET FORMAT TO customer.fmt BROWSE FORMAT Note that there are four columns in the Browse window. Two of these are read-only fields, with CNO and CUSTOMER as constant text. The other two fields contain the actual contents of the CNO and COMPANY fields. Additional reference words: FoxDos FoxWin 2.60 KBCategory: kbprg kbprb KBSubcategory: FxinteropDbase
 * }