BUG: TRIM() Function in dBASE Label Is Not Migrated

Last reviewed: June 28, 1995
Article ID: Q112475
The information in this article applies to:
  • Microsoft FoxPro for MS-DOS, version 2.6
  • Microsoft FoxPro for Windows, version 2.6

SYMPTOMS

When printing a label migrated from dBASE IV, there are extra spaces between fields.

CAUSE

When FoxPro migrates the label, it does not add the TRIM() function to the character fields that had the "T" picture function in dBASE.

RESOLUTION

Modify the FoxPro label and use the TRIM() function on each field on which the trailing spaces should be removed.

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

Steps to Reproduce Problem

  1. In dBASE IV, create a label with the following layout:

          XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX  && field: company name
          XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX  && field: address
    
          XXXXXXXXXXXXXXX, XX  XXXXX           && fields: city, state, zip
    
       By default each of the character fields will have the picture function
       "T", which is the TRIM function code to remove trailing spaces.
    
    

  2. In FoxPro 2.6, choose Convert dBASE files from the Run menu. Select the directory where the above label was saved, double-click the label to mark it, and then choose Process. When the migration is complete, choose Close.

  3. Modify the label. The following will be the label definition:

          COMPANY
          ADDRESS
          CITY+","+" "+STATE+"  "+ZIP
    

Note that none of the fields are TRIMmed. This will cause the output from the label to be different from that of dBASE IV.

To correct this problem, the label definition should be:

   TRIM(company)
   TRIM(address)
   TRIM(city)+","+" "+TRIM(state)+"  "+TRIM(zip)


Additional reference words: FoxDos FoxWin 2.60 buglist2.60 migrate convert
.lbl .lbx
KBCategory: kbprg kbbuglist
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.