General information
Category:
Coding, syntax & commands
>>>>Hello,
>>>>I want to create a error log file, but I don't know how to write to a file without loosing the existing text.
>>>>Is there a easy way to write "additive" to file?
>>>>Thanks for your help!
>>>Use a table!!!
>>>
>>>Wayne
>>
>>FWIW: We use a table with memo fields for our error log, and one record for each logged event, with fields for date, time, etc. Makes it easy for searching for stuff in VFP, but a pain in the butt for anyone who doesn't have FP/VFP available to them. If you really need the log to be a text file, we have recently been using STRTOFILE()(as suggested by another) with its additive flag, and its fast and easy. I haven't checked, but I suspect it has the 'usual' 2 GB limit, so the earlier suggestion on checking file size is probably a good idea...
>>
>>HTH
>>
>>Rob
>
>Hi,
>I used a table so far, and had no problems with doing it. But it came into my mind, that tables can go corrupted, a file is much more secure. Especially, if an error occurs, it might be not the best time to open a table and write to it.
>Once my error table was really corrupted, so I could not read it anymore.
>However, you can store more information into a table, with all the memo and status informations into memo fields.
>A textfile is not useful for this.
Hi Christian:
Good point. Thanx for your thoughts on this.
Rob
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