Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Clearing a flat file from memory
Message
From
08/11/2001 12:04:07
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Troubleshooting
Title:
Clearing a flat file from memory
Miscellaneous
Thread ID:
00579164
Message ID:
00579164
Views:
53
I am reading a value from a flat file.
I have a button on a form with the following code:
CVALUE=FILETOSTR('C:\DWGNUM.TXT')
? CVALUE

Ok lets say the dwgnum.txt file consists of the following value '0001'

I run my form press my button and voila the value '0001' is displayed...
Now I don't close my form but I open dwgnum.txt and change the value to '0002' and save the file.

Then I press my button again and OOPS... it displays '0001' again.
I have to close and reopen the app not just the form to clear the value.
How can I force VFP to read that file again instead of using what is in memory?
I've tried the following with no luck in my button code:
CLEAR RESOURCES ('C:\DWGNUM.TXT')
CLEAR GETS
FCLOSE(FOPEN('C:\DWGNUM.TXT'))

Thanks
Next
Reply
Map
View

Click here to load this message in the networking platform