I've had some scripts that read and write to txt files. Every once in a while I get an error the page, and find out that the last time the txt file was updated, it never finished the lines of text, so it threw errors in my parsing. I'm assuming this happens because the server crashed or something.
My question is, what is the best way to avoid this. Does CFTRANSACTION work with this. I've seen it suggested a few places, but I thought it only worked with database queries. Or would it be a good idea to write to a tmp file and then make a copy to the new.
Also, does CFLOCK work with CFFILE tags and when should it be used. Just on the write or append, or the read also.
Anybody have feedback on this? - tleish
My question is, what is the best way to avoid this. Does CFTRANSACTION work with this. I've seen it suggested a few places, but I thought it only worked with database queries. Or would it be a good idea to write to a tmp file and then make a copy to the new.
Also, does CFLOCK work with CFFILE tags and when should it be used. Just on the write or append, or the read also.
Anybody have feedback on this? - tleish