General information
Category:
Coding, syntax & commands
>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?
Just a stab in the dark - have you tried putting a DOEVENTS just after writing the to see if that makes a difference?
Previous
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only