Internet Transfer Control: How to "Close" it? 
Author Message
 Internet Transfer Control: How to "Close" it?

Reposting, because I thought my original subject wasn't very clear:

Using the ITC to transmit a file to an FTP server.  All the transfer stuff
happens nicely, but when I exit the subform the transfer is run from there
is a delay that interestingly enough corresponds to the .RequestTimeout
value.  It seems like I don't know how to actually get the control to end
it's session.  Here is what I have tried:

In the Form_Unload event, I included the following commands individually,
none of which seemed to work: (Note:  cmdExit_Click contains "Unload Me"
command)

Inet1.Execute , "close"
Inet1.Execute , "quit"
Inet1.Cancel

In the State_Changed event, I used the same three methods as above when the
state was icResponseCompleted.  Some of these also included one of the above
commands in Form_Unload, and sometimes these were commented out.

Does anyone have any suggestions on how to tell ITC "OK, you're done now -
you don't have to do anything any more, so shut yourself down immediately"

TIA

Scott Smith
Michigan State University
Human Resource Information Systems



Sat, 14 Aug 2004 21:41:55 GMT  
 Internet Transfer Control: How to "Close" it?
I believe the classic method is:

with Inet1
.Execute...'FTP command for file transfer is here
While .StillExecuting
Do Events
Loop
.cancel
end with
Set Inet1=Nothing

Quote:

> Reposting, because I thought my original subject wasn't very clear:

> Using the ITC to transmit a file to an FTP server.  All the transfer stuff
> happens nicely, but when I exit the subform the transfer is run from there
> is a delay that interestingly enough corresponds to the .RequestTimeout
> value.  It seems like I don't know how to actually get the control to end
> it's session.  Here is what I have tried:

> In the Form_Unload event, I included the following commands individually,
> none of which seemed to work: (Note:  cmdExit_Click contains "Unload Me"
> command)

> Inet1.Execute , "close"
> Inet1.Execute , "quit"
> Inet1.Cancel

> In the State_Changed event, I used the same three methods as above when the
> state was icResponseCompleted.  Some of these also included one of the above
> commands in Form_Unload, and sometimes these were commented out.

> Does anyone have any suggestions on how to tell ITC "OK, you're done now -
> you don't have to do anything any more, so shut yourself down immediately"

> TIA

> Scott Smith
> Michigan State University
> Human Resource Information Systems



Sat, 14 Aug 2004 23:56:47 GMT  
 Internet Transfer Control: How to "Close" it?
Shouldn't that be Inet1.Execute , "bye" ?


I believe the classic method is:

with Inet1
.Execute...'FTP command for file transfer is here
While .StillExecuting
Do Events
Loop
.cancel
end with
Set Inet1=Nothing


Quote:
> Reposting, because I thought my original subject wasn't very clear:

> Using the ITC to transmit a file to an FTP server.  All the transfer stuff
> happens nicely, but when I exit the subform the transfer is run from there
> is a delay that interestingly enough corresponds to the .RequestTimeout
> value.  It seems like I don't know how to actually get the control to end
> it's session.  Here is what I have tried:

> In the Form_Unload event, I included the following commands individually,
> none of which seemed to work: (Note:  cmdExit_Click contains "Unload Me"
> command)

> Inet1.Execute , "close"
> Inet1.Execute , "quit"
> Inet1.Cancel

> In the State_Changed event, I used the same three methods as above when
the
> state was icResponseCompleted.  Some of these also included one of the
above
> commands in Form_Unload, and sometimes these were commented out.

> Does anyone have any suggestions on how to tell ITC "OK, you're done now -
> you don't have to do anything any more, so shut yourself down immediately"

> TIA

> Scott Smith
> Michigan State University
> Human Resource Information Systems



Sun, 15 Aug 2004 00:39:06 GMT  
 Internet Transfer Control: How to "Close" it?
Nah, the ITC uses "close". It was specifically written to only handle a
subset of FTP commands, which are listed in the online help. I know you
specifically don't want to provide the first argument with the close
command, as if a connection isn't open, it'll open one just to close it,
causing noticeable delays. That's not the case here, so I don't know what's
causing the delay, but I've seen a similar one in some of our stuff here.
Never checked to see if it correllated with the RequestTimeout or not.

On a side note, the While loop included below will rack your CPU usage to
100% while running, which is A Bad Thing. You can solve it by adding a call
to the WaitMessage() API function right before DoEvents.

Quote:

> Shouldn't that be Inet1.Execute , "bye" ?



> I believe the classic method is:

> with Inet1
> .Execute...'FTP command for file transfer is here
> While .StillExecuting
> Do Events
> Loop
> .cancel
> end with
> Set Inet1=Nothing



> > Reposting, because I thought my original subject wasn't very clear:

> > Using the ITC to transmit a file to an FTP server.  All the transfer
stuff
> > happens nicely, but when I exit the subform the transfer is run from
there
> > is a delay that interestingly enough corresponds to the .RequestTimeout
> > value.  It seems like I don't know how to actually get the control to
end
> > it's session.  Here is what I have tried:

> > In the Form_Unload event, I included the following commands
individually,
> > none of which seemed to work: (Note:  cmdExit_Click contains "Unload Me"
> > command)

> > Inet1.Execute , "close"
> > Inet1.Execute , "quit"
> > Inet1.Cancel

> > In the State_Changed event, I used the same three methods as above when
> the
> > state was icResponseCompleted.  Some of these also included one of the
> above
> > commands in Form_Unload, and sometimes these were commented out.

> > Does anyone have any suggestions on how to tell ITC "OK, you're done
now -
> > you don't have to do anything any more, so shut yourself down
immediately"

> > TIA

> > Scott Smith
> > Michigan State University
> > Human Resource Information Systems



Sun, 15 Aug 2004 00:51:38 GMT  
 Internet Transfer Control: How to "Close" it?
Well, this doesn't work, as you can't set a control to Nothing, at least,
according to my compiler.  Run-time error.

Also, using the Execute method puts the control into Asynchronous mode,
which fires the State_Changed event with certain things happen in the
control, one of which is ResponseCompleted, which lets you determine when
the command is complete so you can do other things once that happens (like
execute another command).  This eliminates the need for the DoEvents loop
you have shown here.


I believe the classic method is:

with Inet1
.Execute...'FTP command for file transfer is here
While .StillExecuting
Do Events
Loop
.cancel
end with
Set Inet1=Nothing


Quote:
> Reposting, because I thought my original subject wasn't very clear:

> Using the ITC to transmit a file to an FTP server.  All the transfer stuff
> happens nicely, but when I exit the subform the transfer is run from there
> is a delay that interestingly enough corresponds to the .RequestTimeout
> value.  It seems like I don't know how to actually get the control to end
> it's session.  Here is what I have tried:

> In the Form_Unload event, I included the following commands individually,
> none of which seemed to work: (Note:  cmdExit_Click contains "Unload Me"
> command)

> Inet1.Execute , "close"
> Inet1.Execute , "quit"
> Inet1.Cancel

> In the State_Changed event, I used the same three methods as above when
the
> state was icResponseCompleted.  Some of these also included one of the
above
> commands in Form_Unload, and sometimes these were commented out.

> Does anyone have any suggestions on how to tell ITC "OK, you're done now -
> you don't have to do anything any more, so shut yourself down immediately"

> TIA

> Scott Smith
> Michigan State University
> Human Resource Information Systems



Sun, 15 Aug 2004 03:05:09 GMT  
 
 [ 5 post ] 

 Relevant Pages 

1. MS Internet Transfer Control - "PUT"

2. "Passive" Internet Transfer Control FTP connection

3. Internet Transfer Control, "GET", and the HTTP Protocol

4. Internet Transfer Control "Execute" Method

5. MS Internet Transfer Control - "PUT"

6. Internet Transfer Control "Access Denied"

7. Internet Transfer Control - "Element Not Found"

8. Internet Transfer error "35764"

9. VB5/ASP Internet Transfer Control and ENCTYPE="MULTIPART/FORM-DATA

10. Internet Control......."Support for Target Frames..???"

11. VB5 Internet Control.Execute "CD subdir"

12. internet control execute ,"HEAD" problem

 

 
Powered by phpBB® Forum Software