PRB: @ ... SAY Command in Format File Causes Extra Column

Last reviewed: June 28, 1995
Article 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.

MORE INFORMATION

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


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: June 28, 1995
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.