Hi folks, first thank you very much for your potential help in reducing my headache and teaching me a thing or two! :)
I have two programs, one saves a local copy .txt file with info, and also uploads this same .txt file to a ftp server, it does this with updated information at an interval of 30 seconds. All of this works, if I log into the FTP I open the .txt file and sure enough, the new .txt file is there and updates normally, every 30 seconds.
The second program simply tries to download this .txt file from the FTP server, tried as a windows form and from asp on the server itself. This task only runs at my discretion, so no timer is set. My problem is here, the file is successfully downloaded and read, however, after its updated (verified even by logging in physically to the ftp server) the output of the program continues to be the old text file and gets a new one a few minutes or whenever the heck it wants to really after stopping the auto upload, or God knows what I really have not come to a exact conclusion as to when it actually successfully downloads the updated text file.
So my questions are really the following;
I have closed all ftp connections after running the ftp upload, all the streams and so on...closed; it IS every 30 seconds and I'm thinking somehow i manage to try to connect at the same time to the file ? but then WHY do I get the OLD file (even after more than 1 update it still shows file number one per se).
OK GOsh I suck at explaining problems,
OK program 1 = p1
program 2 = p2
p1 - writes timestamp to ping.txt ---> sends to FTP (succeeds)
- repeats every 30 seconds (succeeds)
p2 - connects to ftp and downloads the ping.txt and reads it onto a string var DaPing per se
ok so
p1 ---
puts 4:03pm
....30 secs go by
puts 4:03pm
....30 secs go by
puts 4:04pm
....30 secs go by
puts 4:04pm
....30 secs go by
puts 4:05pm
....30 secs go by
puts 4:05pm
....etc twice every minute
NOW p2 checks lets say at 4:05, and 4:10
the file that p2 READS still says 4:03pm
if i go to the ftp myself via client the file I open is 4:0x whatever the last one put was.
WHY is this happening? :( and how do I fix, if it is time related or connection related what could it be and why?
Thanks so much guys, I apologize for my long windedness I just really lack any other form of communication :P I tried though I promise :(
I have two programs, one saves a local copy .txt file with info, and also uploads this same .txt file to a ftp server, it does this with updated information at an interval of 30 seconds. All of this works, if I log into the FTP I open the .txt file and sure enough, the new .txt file is there and updates normally, every 30 seconds.
The second program simply tries to download this .txt file from the FTP server, tried as a windows form and from asp on the server itself. This task only runs at my discretion, so no timer is set. My problem is here, the file is successfully downloaded and read, however, after its updated (verified even by logging in physically to the ftp server) the output of the program continues to be the old text file and gets a new one a few minutes or whenever the heck it wants to really after stopping the auto upload, or God knows what I really have not come to a exact conclusion as to when it actually successfully downloads the updated text file.
So my questions are really the following;
I have closed all ftp connections after running the ftp upload, all the streams and so on...closed; it IS every 30 seconds and I'm thinking somehow i manage to try to connect at the same time to the file ? but then WHY do I get the OLD file (even after more than 1 update it still shows file number one per se).
OK GOsh I suck at explaining problems,
OK program 1 = p1
program 2 = p2
p1 - writes timestamp to ping.txt ---> sends to FTP (succeeds)
- repeats every 30 seconds (succeeds)
p2 - connects to ftp and downloads the ping.txt and reads it onto a string var DaPing per se
ok so
p1 ---
puts 4:03pm
....30 secs go by
puts 4:03pm
....30 secs go by
puts 4:04pm
....30 secs go by
puts 4:04pm
....30 secs go by
puts 4:05pm
....30 secs go by
puts 4:05pm
....etc twice every minute
NOW p2 checks lets say at 4:05, and 4:10
the file that p2 READS still says 4:03pm
if i go to the ftp myself via client the file I open is 4:0x whatever the last one put was.
WHY is this happening? :( and how do I fix, if it is time related or connection related what could it be and why?
Thanks so much guys, I apologize for my long windedness I just really lack any other form of communication :P I tried though I promise :(
Comment