I'm having trouble with the internet transfer control. I have the following code for testing:
Option Explicit
Private Sub Command1_Click()
Inet1.Execute "ftp://xx.xx.xx.xx", "GET /test/test.txt c:\temp\test.txt"
End Sub
Private Sub Inet1_StateChanged(ByVal State As Integer)
MsgBox State
If State = 12 Or State = 11 Then Inet1.Execute "ftp://xx.xx.xx.xx", "CLOSE"
End Sub
where inet1 is an internet transfer control on the form, and xx.xx.xx.xx is a valid ftp site. The test.txt file exists also, and is 25 bytes long. I find that sometimes this code works, and more often doesn't. It always seems to establish a connection, but then sometimes transfers the file, and sometimes returns an error, and sometimes doesn't return an error and also fails to transfer the file. I have never gotten a file of 250k to transfer.
Is this control not particularly robust, or are there things I need to know about it before using it in a production application effectively? If the former, does anyone have a suggestion of how to programmatically transfer files from an ftp site to a local client?
TIA
Bob
Option Explicit
Private Sub Command1_Click()
Inet1.Execute "ftp://xx.xx.xx.xx", "GET /test/test.txt c:\temp\test.txt"
End Sub
Private Sub Inet1_StateChanged(ByVal State As Integer)
MsgBox State
If State = 12 Or State = 11 Then Inet1.Execute "ftp://xx.xx.xx.xx", "CLOSE"
End Sub
where inet1 is an internet transfer control on the form, and xx.xx.xx.xx is a valid ftp site. The test.txt file exists also, and is 25 bytes long. I find that sometimes this code works, and more often doesn't. It always seems to establish a connection, but then sometimes transfers the file, and sometimes returns an error, and sometimes doesn't return an error and also fails to transfer the file. I have never gotten a file of 250k to transfer.
Is this control not particularly robust, or are there things I need to know about it before using it in a production application effectively? If the former, does anyone have a suggestion of how to programmatically transfer files from an ftp site to a local client?
TIA
Bob