Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Memory Variables
Message
From
19/10/2003 06:35:22
 
 
To
18/10/2003 12:32:26
Fred Wood
Madera Systems Consulting
Mill Valley, California, United States
General information
Forum:
Visual FoxPro
Category:
Troubleshooting
Miscellaneous
Thread ID:
00839584
Message ID:
00840088
Views:
15
>Greg,
>
>The reason there are so many variables involved is because I am attempting to run part of a fairly complicated VFP-based accounting program (the part which ships orders, creates invoices, and updates inventory) from an external VFP application which allows you to schedule programs to be run automatically on what ever time schedule you set up.
>
>In order to execute the "shipping" program, I have to create the same environment as if it was being run from the accounting program itself and I am using startup procedures from the accounting program to create that environment. These procedures initiate global variables and arrays the shipping program expects.
>
>By using RELEASE ALL or CLEAR I was trying to clean up VFP memory before returning to the scheduling program and avoid the Too Many Variables error the next time my "shipping" program runs.
>
>My main question is why doesn't RELEASE ALL EXTENDED reset memory so that it can start over each time with out eventually getting a Too Many Variables error? Does CLEAR MEMORY get rid of something RELEASE ALL does not?
________________________________________________________________________________
First message :
I am running a .PRG from the Visual FoxPro 6.0 command window. If I run it three times in a row I get a "Too Many Variables" error. The program's last line is RELEASE ALL EXTENDED and if I display memory after the program is run Visual FoxPro says there are no variables defined. Also, if I suspend the program when the error occurs, display status says there are 760 variables defined and 1240 available.
________________________________________________________________________________
Fred,

I'm not in favour of RELEASE ALL EXTENDED, your own variables get destroyed.

Seems like it is creating new variables each time.

I would investigate what variables it is adding (maybe download#15242 can help you with that, put the variable names in a cursor), ie find out what variables are addded on each invocation of that prog. You

Maybe SAVE TO before calling the program and RESTORE FROM after the prog can get rid of the extra public variables, just a thought.

Also, maybe that program alters your environment (SET ...) ?

Worst case would be to create a separate exe and run it as a separate process (if at all possible)

Good luck
Gregory
Previous
Reply
Map
View

Click here to load this message in the networking platform