Microsoft KB Archive/171047: Difference between revisions
m (Text replacement - ">" to ">") |
m (Text replacement - """ to """) |
||
Line 22: | Line 22: | ||
== SYMPTOMS == | == SYMPTOMS == | ||
Working programs in FoxPro 2.x fail with the error | Working programs in FoxPro 2.x fail with the error "Insufficient Memory" when run on newer, faster computers with clock speeds greater than 150 MHz. This problem applies to both screens with list boxes and queries, but this article addresses only the problem with FoxPro screens.<br /> | ||
<br /> | <br /> | ||
The | The "Insufficient Memory" error message may also occur while in Filer when changing to a local(not network) directory which contains a large number of files.<br /> | ||
<br /> | <br /> | ||
The failure also happens on both MMX and non MMX Computers. The operating system could be Windows 3.x, Windows for Workgroups 3.x, Windows 95 or Windows NT. This error does not occur in FoxPro For MS-Dos. | The failure also happens on both MMX and non MMX Computers. The operating system could be Windows 3.x, Windows for Workgroups 3.x, Windows 95 or Windows NT. This error does not occur in FoxPro For MS-Dos. | ||
Line 73: | Line 73: | ||
== MORE INFORMATION == | == MORE INFORMATION == | ||
Use the Microsoft Knowledge Base at the following URL to troubleshoot other potential causes of the | Use the Microsoft Knowledge Base at the following URL to troubleshoot other potential causes of the "Insufficient memory" errors: | ||
<blockquote>http://www.microsoft.com/support/</blockquote> | <blockquote>http://www.microsoft.com/support/</blockquote> | ||
Line 81: | Line 81: | ||
=== Steps to Reproduce Behavior === | === Steps to Reproduce Behavior === | ||
The following is a reproducible case where FoxPro for Windows 2.x fails with | The following is a reproducible case where FoxPro for Windows 2.x fails with "Insufficient memory" error with a list box on a screen. | ||
<ol> | <ol> | ||
<li><p>Place the following code in a new program file. Save it as LarTable.prg:</p> | <li><p>Place the following code in a new program file. Save it as LarTable.prg:</p> | ||
Line 104: | Line 104: | ||
* FOR LOOP to fill the table. | * FOR LOOP to fill the table. | ||
FOR x = 1 TO NumRecords | FOR x = 1 TO NumRecords | ||
CharString= | CharString="Record "+PADL(ALLTRIM(STR(x,numwide,0)),NumWide,"0") | ||
INSERT INTO LarTable (CharVal,NumVal) VALUES(CharString, x) | INSERT INTO LarTable (CharVal,NumVal) VALUES(CharString, x) | ||
? RECNO() | ? RECNO() | ||
Line 112: | Line 112: | ||
<li>Add a ListBox object from the toolbar on the left of the screen.</li> | <li>Add a ListBox object from the toolbar on the left of the screen.</li> | ||
<li>Select the '''From Field''' option button and type LarTable.Charval in the '''Field''' dialog box.</li> | <li>Select the '''From Field''' option button and type LarTable.Charval in the '''Field''' dialog box.</li> | ||
<li>Type | <li>Type "MyList" in the Variable text box. Click '''OK''' to close the dialog box. Resize the ListBox, if necessary.</li> | ||
<li>Add a Push Button in which you use '''Close''' as the prompt and select the '''Terminate READ on Selection''' check box. Enter | <li>Add a Push Button in which you use '''Close''' as the prompt and select the '''Terminate READ on Selection''' check box. Enter "xyz" for the variable.</li> | ||
<li>Generate and run the LarTable.spr screen. It should run without error on computers slower than a 166 MHz computer.</li> | <li>Generate and run the LarTable.spr screen. It should run without error on computers slower than a 166 MHz computer.</li> | ||
<li>It should fail with an | <li>It should fail with an "Insufficient Memory" error on most computers 166 MHZ or faster. Use "mybutton" as the variable prompt.</li></ol> | ||
The code generally fails when the screen loads on faster computers. This problem happens only when the table contains more than about 600 records. Try deleting all but the first 600 records: | The code generally fails when the screen loads on faster computers. This problem happens only when the table contains more than about 600 records. Try deleting all but the first 600 records: |
Latest revision as of 10:05, 21 July 2020
The information in this article applies to:
SYMPTOMSWorking programs in FoxPro 2.x fail with the error "Insufficient Memory" when run on newer, faster computers with clock speeds greater than 150 MHz. This problem applies to both screens with list boxes and queries, but this article addresses only the problem with FoxPro screens.
CAUSEThe current fast computers were not available for testing when FoxPro 2.x for Windows was initially released. Microsoft FoxPro for Windows, 2.x does not always work with list boxes populated from tables with more than 600 records.
RESOLUTIONAt this time Microsoft does not have a good workaround; however, the following are options to consider:
Along with the preceding steps, some users have found that adding the following line to the Config.fpw file helps to solve the problem: MEMLIMIT = 60,2048,4098
STATUSMicrosoft has confirmed this to be a problem in the Microsoft products listed at the beginning of this article.
MORE INFORMATIONUse the Microsoft Knowledge Base at the following URL to troubleshoot other potential causes of the "Insufficient memory" errors: NOTE: Verify that the error is due to the processor speed by trying the code on both a fast and slow computer. Steps to Reproduce BehaviorThe following is a reproducible case where FoxPro for Windows 2.x fails with "Insufficient memory" error with a list box on a screen.
The code generally fails when the screen loads on faster computers. This problem happens only when the table contains more than about 600 records. Try deleting all but the first 600 records: DELETE ALL FOR RECNO > 600 (c) Microsoft Corporation 1997, All Rights Reserved. Contributions by Mike Fernald, Microsoft Corporation. Additional query words: foxwin fpw MMX Keywords : FoxWin FxenvGeneral Version : WINDOWS:2.6,2.6a Platform : WINDOWS Issue type : kbprb |
Last Reviewed: June 28, 1999 |