Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Corrupt DBF
Message
From
24/08/2011 18:04:24
Victor Chignes
Inteliventas
Peru
 
 
To
24/08/2011 05:08:37
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
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:
01521728
Views:
49
Thanks Dragan. Im already using a mssql database, but I'll include this approach in other app.


>>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.
Previous
Reply
Map
View

Click here to load this message in the networking platform