Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Corrupt DBF
Message
De
24/08/2011 18:04:24
 
 
À
24/08/2011 05:08:37
Dragan Nedeljkovich
Now officially retired
Zrenjanin, Serbia
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Titre:
Versions des environnements
Visual FoxPro:
VFP 9 SP1
OS:
Windows 7
Divers
Thread ID:
01521606
Message ID:
01521728
Vues:
47
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.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform