On Monday, July 27, 2020 at 4:43:52 PM UTC-7, Darkwood wrote:debugging and copied the .PRG to their computer and stepped through it. I re-connected manually through the "? prompt" in the debugger, and everything worked. I was wondering if there is a fool proof way of checking the connection in the program so we
I have a little proggy that zips and FTP's a data backup to my FTP site nightly. This works great for most of my clients, but one has a problem. I noticed that their backups stopped coming through and I couldn't figure out why. So I compiled with
TIA,
Mike
I believe it was a Windoze Update that broke it, but I am not seeing this behavior anywhere else. Here is a snippit of code showing how I fixed it:
if oFTP:Open( cURL )
connected:=.T.
? "Connection established", oFTP:cReply
@z,1 say "Connected: "+oFTP:cReply
z++
oftp:Port()
oftp:busepasv:=.T.
? "Connecting to", server
oFTP:Open(curl)
?oftp:creply
? "Connecting to", server
oFTP:Open(curl)
?oftp:creply
I found that if I did a couple oFTP:Open(Curl)'s before I tried to do anything like transfer a file, it worked. I don't know why.
Mike
Sysop: | Keyop |
---|---|
Location: | Huddersfield, West Yorkshire, UK |
Users: | 418 |
Nodes: | 16 (3 / 13) |
Uptime: | 34:10:41 |
Calls: | 8,808 |
Calls today: | 4 |
Files: | 13,304 |
Messages: | 5,971,245 |