Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Appending text to low level file
Message
From
06/07/1999 23:42:18
 
 
To
05/07/1999 11:38:56
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00236407
Message ID:
00238099
Views:
10
>>>>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
Map
View

Click here to load this message in the networking platform