FIX: Trim Format on GET Field Causes Nonterminating Loop

Last reviewed: September 22, 1997
Article ID: Q95668
2.00 MS-DOS kbprg kbfixlist kbbuglist kberrmsg

The information in this article applies to:

  • Microsoft FoxPro for MS-DOS, version 2.0

SYMPTOMS

When you are attempting to append a record to a database, a trim format applied to a GET field in a screen will cause nonterminating looping to occur, when the trim format is used in conjunction with a VALID clause that returns false when the field is empty. This behavior occurs both when the GETs are memory variables as well as database fields.

RESOLUTION

This looping will not occur if the Trim picture clause is not used or if the VALID clause is not used.

STATUS

Microsoft has confirmed this to be a problem in FoxPro 2.0 for MS-DOS. This problem was corrected in FoxPro 2.5 for MS-DOS.

MORE INFORMATION

Steps to Reproduce Problem

  1. Create a database with one field.

  2. Create a quick screen using the Screen Builder.

  3. Double-click the GET field. Choose the Format button.

  4. Select the Trim check box. Choose OK.

    The format will now contain @T.

  5. Select the VALID clause check box for the GET field. Place the following code in the VALID clause.

          IF EMPTY(fieldname)
    
            RETURN .F.
          ENDIF
    
    

  6. On the screen, place a push button that appends a record.

  7. Save and generate the screen program (.SPR).

  8. In the Command window, type:

          DO <screen name>.spr
    

If the Append push button is chosen, the error message "Invalid Input Press Space" will appear at the bottom of the screen once the other GET field has been entered and exited. Pressing the SPACEBAR will not allow the GET field to be edited. The .SPR file will continue to loop until you press the ESC key or reboot your machine.


Additional reference words: FoxDos 2.00 buglist2.00 fixlist2.50 hang errmsg
err
msg
KBCategory: kbprg kbfixlist kbbuglist kberrmsg
KBSubcategory:
Solution Type : kbfix


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: September 22, 1997
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.