i facing problems like this. assume the program was like an email compose
interface. the "to","cc","bcc", and "subject" will be write into database
and the area where we write the message will write to text file, save in
.txt format.

for database part, i can do it cause the record was there. but the text file
i cannot save the things i write. it just appear empty and error occur.

how to write at the same time in database and text file at the same time
when user click save ?