>Hello,
> I used the fopen("dummy",2) and fputs() to append data to a text file. It overwrote the exist data instead of append to the text file. What did I do wrong ? thanks
>nFile=fopen("dummy",2)
>if nfile > 0
> = fputs(nfile,"test")
>endif
>fclose(nfile)
>sherry
Sherry, you have to position to the end of file before writing.
=fseek(nfile, 0, 2)
= fputs(nfile,"test")
Consider also using STRTOFILE() function (VFP6) instead of low-level functions.
Nick Neklioudov
Universal Thread Consultant
3 times Microsoft MVP - Visual FoxPro
"I have not failed. I've just found 10,000 ways that don't work." - Thomas Edison