Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Clearing a flat file from memory
Message
De
08/11/2001 12:04:07
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Problèmes
Titre:
Clearing a flat file from memory
Divers
Thread ID:
00579164
Message ID:
00579164
Vues:
52
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
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform