Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Releasing reference to .txt file in VFP environment
Message
 
 
To
01/07/2002 19:07:33
Jordan Pastourel
Worksafe Management Systems
Toowong, Australia
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00674186
Message ID:
00674243
Views:
24
Jordan,

You most definately have a problem in your code where you are not getting the fclose() properly called. Short of doing a CLOSE ALL as Sergey recommends you can use DISPLAY STATUS which will give you the open file handles and can just close a specific one with a fclose( n ) where n is the number you see in the above output.

>this might be a really easy thing to fix, but i will be damned if i can find it. i am opening a text file with fopen() stepping through with fgets() and at the end doing an fclose().
>all is well here until the second time i run it. fopen() fails as if it is still open in the environment. if i close VFP (6) and start it up again i can run the program though again with a successful fopen(). the VFP environment must still be holding a reference to it.
>i have tried clear all, clear programs, clear resources, clear memory, release all, release all extended to try and remove the reference but to no avail.
>any ideas? it is very tedious close VFP everytime i need to run the program.
df (was a 10 time MVP)

df FoxPro website
FoxPro Wiki site online, editable knowledgebase
Previous
Reply
Map
View

Click here to load this message in the networking platform