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 biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Problems with MS Internet Transfer control

Status
Not open for further replies.

GKBray

IS-IT--Management
Jan 14, 2003
51
GB
Hi,

I am trying to use the above Active X control to download a file from an FTP Server.

I am using the Following code.


lcURL="FTP://mell"
lcCommand="GET NewStock.csv c:\NewStock.CSV"
Thisform.Inet1.Execute (lcURL,lcCommand)

DO WHILE Thisform.Inet1.stillExecuting=.T.
WAIT WINDOW "Recieving File" NoWait
ENDDO
lcResult=THISFORM.Inet1.GetChunk(64000)
Messagebox(lcResult)

I have tested annonymous access to the FTP Server using IExplorer, with no problems.

When I run the code, I can see the current session registered on the FTP Server in IIS Manager, but the file download never terminates.

Many thanks for any comments.

Graham

G K Bray Programmer
 
It's probably never getting a chance to terminate, or at least notify Fox that it did, especially since you have the transfer outside the loop.

Try a little pause in there so events can happen:
Code:
DO WHILE Thisform.Inet1.stillExecuting=.T.
   DOEVENTS
   WAIT WINDOW "Recieving File" TIMEOUT .1
   lcResult=THISFORM.Inet1.GetChunk(64000)
ENDDO
Haveing never used that contorl, I may have things a little wrong, but you should get the idea.


-Dave Summers-
[cheers]
Even more Fox stuff at:
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top