>>>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.
>
>>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).
>
>Hi Fred,
>
>Thanks for your reply. I didn't know that command existed until I ran into this trouble. I'm surprised that FoxPro has a problem handling memory in excess of one gigabyte.
>
>I applied the suggestions that Sergey provided and the application is working great. Thanks again.
>
>---Michael
It's not that VFP has a "problem" with larger amounts of memory, it's just that Windows lies in telling how much memory is actually available (includes swap space). VFP tries to take as much memory as it can, so it may end up using the swap space as RAM and that doesn't work very well.