PRB: FSIZE() Returns 0 or "File Does Not Exist"

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

SYMPTOMS

The FSIZE() function either returns a value of 0 or the following error message:

   File does not exist.

CAUSE

The FSIZE() function is using the wrong parameter for the current state of the SET COMPATIBLE statement.

When SET COMPATIBLE is OFF or FOXPLUS, the FSIZE() function returns the size of the specified field in the currently used table.

When SET COMPATIBLE is ON or DB4, the FSIZE() function returns the size of the specified file.

WORKAROUNDS

FSIZE() Returns 0 for Size of File

If the FSIZE() function is attempting to determine the size of a file, do one of the following:

  • Change the SET COMPATIBLE setting to ON or DB4 so that FSIZE() returns the file size (dBASE behavior).

    -or-

  • Use the ADIR() function instead of FSIZE() to determine the file size when SET COMPATIBLE is OFF or FOXPLUS.

For additional information about using ADIR() to obtain a file size, please see the following article(s) in the Microsoft Knowledge Base:

   ARTICLE-ID: Q100554
   TITLE: Using ADIR() Function to Obtain MS-DOS File Information

FSIZE() Returns "File Does Not Exist"

If the FSIZE() function is attempting to determine the size of a field in a table, change the SET COMPATIBLE setting to OFF or FOXPLUS so that FSIZE() returns a field size (FoxPro behavior).

NOTE: Changing the SET COMPATIBLE setting may affect other commands and functions in the program.

MORE INFORMATION

The SET COMPATIBLE statement does not affect the behavior of the FSIZE() function in previous versions of FoxPro.


Additional reference words: FoxDos FoxWin 2.60 errmsg err msg zero
KBCategory: kbprg kberrmsg kbprb
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.