>I'm having problems with insufficient memory while processing large tables using the VFP7 runtime. The procedure translates DBFs exported from Cognos Impromptu into highly-formatted Excel spreadsheets, and then emails the files as attachments.
>
>With relatively small tables (less than 500,000 records), there are no problems. However, with a table of more than one million records (over 1 gigabyte file size), the runtime reports errors such as "Not enough memory for file map" (#1150). The runtime is unable to launch an instance of Excel. It also reports insufficient memory while trying to copy a simple 25-record table to an array. However, if I run the same process from the FoxPro command line, there are no memory problems, and everything works. But, it needs to process as a runtime.
>
>I am using an HP 3.2 GHz dual-Xeon processor with 2 gigs of memory, 25 gigs of free space, and Win XP SP2. The same runtime and tables have been running flawlessly on a 2 GHz Pentium III with 1 gig of memory for a few years. However, it is necessary to upgrade to a faster system, because of the volume of data.
>
>What are the differences in the memory management between the development version and the runtime? Are there any adjustments that can be made?
>
>---Michael Reynolds
Try including a call to SYS(3050) in your code that limits your memory usage to about 1/3 of what's available. (in your case about 600MB).