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

ID: Q115289

The information in this article applies to:

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:

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

Last Reviewed: June 27, 1995