Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Can a file, esp. text file, be locked in VFP
Message
From
15/11/2007 17:07:44
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
 
General information
Forum:
Visual FoxPro
Category:
Other
Environment versions
Visual FoxPro:
VFP 9 SP1
Miscellaneous
Thread ID:
01269089
Message ID:
01269289
Views:
13
>>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.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform