General information
Title:
Clearing a flat file from memory
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
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only