Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Can a file, esp. text file, be locked in VFP
Message
De
15/11/2007 17:07:44
Dragan Nedeljkovich (En ligne)
Now officially retired
Zrenjanin, Serbia
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Versions des environnements
Visual FoxPro:
VFP 9 SP1
Divers
Thread ID:
01269089
Message ID:
01269289
Vues:
14
>>Hi all
>>
>>I need to read and write back to a text file. Is it possible to lock the file during the process (0.002 seconds) using FOPEN()/FWRITE() or FILETOSTR()?
>>
>>Please let me know.
>>
>>Thanks.
>
>Yes with FOPEN() you could open it EXCLUSIVE, check second parameter in HELP.
>But if you lock it with FOPEN you must READ or WRITE in it ONLY with low level function FWRITE, FREAD() etc.

Or Textmerge commands... like this:
h=FCREATE("temp.txt")
_text=h
SET TEXTMERGE on
\<<datetime()>> was a moment ago.
\ no more so.
_text=-1
=FCLOSE(h)
MODIFY COMMAND temp.txt

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform