Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Text File Buffering problem
Message
De
13/11/2017 14:37:44
 
 
À
13/11/2017 12:24:38
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows 10
Divers
Thread ID:
01655554
Message ID:
01655568
Vues:
49
Ok, problem solved.

I checked the value returned from the StrToFile. It is the length written. If 0, then it tries to write again. It while continue trying up to 10 times before responding with a failure to write. Still like to know why I have to do this.

>Hi all,
>
>I should know this solution, but I can not seem to solve it.
>
>In a my code I have a point where a file is read in a variable (FileToStr). The string is modified and then written back to the file (StrToFile). This is done multiple time, very quickly. The problem is that file content that is read is not the file previous written, but the one prior to the writing. It appears that it is reading from the file, but writing to a staging buffer before actually writing to the disk. Therefore the reading does not see the recent changes.
>
>Does anyone have any suggestions? Perhaps flush the buffer?
>Or I should use low-level file functions? Or would that add a performance hit?
Greg Reichert
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform