Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Internet Transfer Control

Status
Not open for further replies.

sborny

Technical User
Joined
Jun 29, 2001
Messages
157
Location
GB
Hi all,

I am writing an App that needs to download a file from a website. I am using the Internet Tranfer Control to do this.

This is the code i have at the moment:

Private Sub Form_Load()
With Inet1
.URL = "ftp://80.88.192.200"
.UserName = "eu7hnbg554fr"
.Password = "db911709sn"
.Execute , "CD csv"
.Execute "GET app.csv C:\Temp\app.csv"
.Execute , "CLOSE" ' Close the connection.
End With

End Sub

When I run this I get a debug error saying "Still executing last command". and then when I hit the debug button the ".Execute "GET app.csv C:\Temp\app.csv""
line is highlighted.

It looks like the close line is trying to close the connection while it is still trying to download the file.

How do I tell the app to wait until the file is downloaded.

Any help is appreciated.

Cheers

Symon.


Everything has an answer, it's just knowing the right question to ask. !!!!
 
Have a look at the Inet1_StateChanged event. You will find the State constants in ObjectBrowser

________________________________________________________________
If you want to get the best response to a question, please check out FAQ222-2244 first

'If we're supposed to work in Hex, why have we only got A fingers?'
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top