BUG: FERROR() Returns 5 When File Handles Exhausted

Last reviewed: June 27, 1995
Article ID: Q130606
The information in this article applies to:
  • Microsoft FoxPro for Windows, version 2.6a

SYMPTOMS

The FERROR() function returns 5 when a file cannot be created because no file handles are available. The FERROR() function should return 4 when a file cannot be created due to insufficient file handles.

RESOLUTION

Instead of checking for a return value of 4, check for a return value of 5. The error 5 should mean Access Denied.

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

Create and run this program:

cnt = 1 DO WHILE cnt <= 400

    myfile = "TF_"+STR(cnt,3,0)
    fret = FCREATE(myfile)
    IF fret = -1
        ? FERROR()
        EXIT
    ENDIF
    cnt = cnt + 1
ENDDO


Additional reference words: 2.60a FoxWin buglist2.60a
KBCategory: kbprg kbbuglist
KBSubcategory: FxprgGeneral


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 27, 1995
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.