Textfile in net+os using the digi

Hello

im using several text files in my program to write data to. I use a ajax application that reads out the data again. But im having a problem at that i can only created a textfile and write data to it. After i close the File descriptor i cannot open it again and write data to it. Here is my code i really hope some one can help me with it.

fdtext = open(Text6, (O_CREAT | O_RDWR ),NASYSACC_LEVEL_RW );

write(fdtext," 3# Meter 1 # nh-22# Voltage# 0# Volt#“, strlen(” 1# Meter 1 # nh-22# Voltage# 0# Volt#"));

write(fdtext,"test", strlen("test"));
close(fdtext);
tx_thread_sleep(10);

fdtext = open(Text6, (O_CREAT | O_RDWR ),NASYSACC_LEVEL_RW );
tx_thread_sleep(10);
write(fdtext,“monkey”, strlen(“monkey”));
close(fdtext);
tx_thread_sleep(10);

In the textfile onley the first 2 writes are there. The last one wont be able to write. Any help on the matter would be great

Yours sincerely,

Tim

Hi again

i fixed my textfile problem. The problem was that the browers were storing my old textfile in the cache memory and not reloading it everytime. Still havent fixed this problem but im getting closer

tim

O_CREAT attempts to create the file. Try opening it up the second time without O_CREAT.

thx for the reply, I already fixed the problem. I thought in the begining that the text file was not writing/ updating but the problem was that the browser was getting the same text file with same size so it did not update it, it just got the old one from the cache memory from the browser. Fixed that problem on the ajax side. but thx for the reply

yours sincerely

tim