Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Corrupt DBF
Message
From
24/08/2011 05:08:37
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
 
 
To
23/08/2011 23:36:58
Victor Chignes
Inteliventas
Peru
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Title:
Environment versions
Visual FoxPro:
VFP 9 SP1
OS:
Windows 7
Miscellaneous
Thread ID:
01521606
Message ID:
01521677
Views:
53
This message has been marked as a message which has helped to the initial question of the thread.
Likes (1)
>Strtofile gave me sometimes "File is in use by another proccess" sometimes in this scenario. TEXT...ENDTEXT too.

I haven't had problems with this approach:
c="text to append to the log file, terminated with a crlf"
strtofile(lcLog, c, 1)
This basically appends the line(s) to the logfile and is very fast, because you aren't writing the whole file, you're doing an equivalent of fopen(), fseek() to the end of file, fwrite(), fclose() - all in a single call. The file is busy for a very short time. And you can trap the error (if it ever happens) in a try/catch and try again a dozen milliseconds later.

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