# PRB: Not Enough Diskspace for <Memo_Filename>

ID: Q119235

The information in this article applies to:

- Microsoft FoxPro for Windows, versions 2.6, 2.6a
- Microsoft FoxPro for MS-DOS, versions 2.6, 2.6a

## SYMPTOMS

In certain circumstances, FoxPro may produce the following error message when you attempt to increase the size of a memo field:

       Not enough diskspace for <memo_filename>

This error message may be produced when there is indeed sufficient disk space for the memo file. This article explains the conditions under which this error message may occur.

## CAUSE

FoxPro will produce the "Not enough diskspace for <memo_filename>" error message under the following conditions:

- FoxPro attempts to change the size of a file on the disk and the attempt fails.
- FoxPro checks the new size of the file (after changing the size of the file) and the size of the file is less than expected.
- If a file write call to the operating system fails, FoxPro will check the reason for the failure against a list of reasons and report an appropriate error message. If the reason reported by the operating system is not one of the reasons for which FoxPro was programmed to produce an error message, the "Not enough diskspace..." error message will be produced by default.

## STATUS

This behavior is by design.

## MORE INFORMATION

When FoxPro for MS-DOS or FoxPro for Windows writes to a file, it uses INT 21, function 0x40. If the operating system returns a number of bytes written that is less than what FoxPro specified on input, this is reported as a "Disk Full" condition.

After changing the size of a file, using INT 21, function 0x40 (with a write length of 0 bytes), FoxPro always checks the new size with the WATCOM C compiler routine lseek(channel, 0, 2). If the returned position is less than the size specified by FoxPro, this is also reported as a "Disk Full" condition.

This operation is performed whenever FoxPro allocates a new memo field to ensure there is enough space for it before an attempt is made to write any of the data.

Additional reference words: FoxDos FoxWin 2.60 2.60a errmsg err msg KBCategory: kbprg kberrmsg kbprb KBSubcategory: FxprgGeneral

Last Reviewed: June 27, 1995 © 1999 Microsoft Corporation. All rights reserved. Terms of Use.