I will have another application for Roo's code though, further down the line. If the data gets lost it's lost forever, one time shot at getting it. In my case the application is running once, continuously, until job is done. My requirement is slightly different to Roo's, I certainly wouldn't be comfortable with saving on Formdestroy. I think I may reconsider using sequential file output. RE: thoughts on file saving safety harebrain (MIS) 22 Jul 08 17:54 As you've said, "yet another way to skin a cat." Procedure TQbInvForm.FormDestroy(Sender: TObject) Įnd As you can see, ArchiveLogFile, which deletes the old one if archived successfully, is called on FormCreate and the new log-file is created on FormDestroy. Procedure TQbInvForm.FormCreate(Sender: TObject) Showmessage('File: ' + MyLogFile + ' not found!') Showmessage('Unable to delete file ' + MyLogFile) If FileExists(MyLogArch) then Append(fOut) else rewrite(fOut) MyLogArch = 'C:\Program Files\QCMenu\MyLogArch.txt' MyLogFile = 'C:\Program Files\QCMenu\MyLogFile.txt'
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |