Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Corrupt DBF
Message
De
24/08/2011 05:08:37
Dragan Nedeljkovich (En ligne)
Now officially retired
Zrenjanin, Serbia
 
 
À
23/08/2011 23:36:58
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:
01521677
Vues:
52
This message has been marked as a message which has helped to the initial question of the thread.
J'aime (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.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform