Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Can a file, esp. text file, be locked in VFP
Message
 
To
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:
01269355
Views:
8
>>>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
>
WOW! I didn't knew that.
Thanks you.
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.
Previous
Reply
Map
View

Click here to load this message in the networking platform