C
cj
This program is used to send files to an ftp server at 2:00am each day.
At the very top of my program I dim a new instance of a com FTP
control. I have a processing sub which calls a login function which runs
the ftp controls login method and verifies it got logged in. The
processing sub then calls a remote directory function. The remote
directory function calls the com controls method to open the directory
for a remote directory listing and gets the listing.
The processing sub can be called from a button click or from the
timer1.tick event. Testing using the button is great. When the timer
kicks it off it logs in fine and then gives "There is no source code
available for the current location" on myftpClient.opendirectory which
is the com controls method to open the directory for a remote directory
listing.
This solves the problem but why? The first line in the processing sub
is Timer1.stop. I do this to keep it from trying to start processing
again while processing is running. The last line in the processing sub
is Timer1.start. If instead of doing this I use a boolean variable as a
flag saying processing is occurring I have no problems. Why would
timer1.stop cause this problem? And why would it allow the login to
work but not the opendirectory?
I expect it's something simple I'm not understanding about timer events.
Please enlighten me.
At the very top of my program I dim a new instance of a com FTP
control. I have a processing sub which calls a login function which runs
the ftp controls login method and verifies it got logged in. The
processing sub then calls a remote directory function. The remote
directory function calls the com controls method to open the directory
for a remote directory listing and gets the listing.
The processing sub can be called from a button click or from the
timer1.tick event. Testing using the button is great. When the timer
kicks it off it logs in fine and then gives "There is no source code
available for the current location" on myftpClient.opendirectory which
is the com controls method to open the directory for a remote directory
listing.
This solves the problem but why? The first line in the processing sub
is Timer1.stop. I do this to keep it from trying to start processing
again while processing is running. The last line in the processing sub
is Timer1.start. If instead of doing this I use a boolean variable as a
flag saying processing is occurring I have no problems. Why would
timer1.stop cause this problem? And why would it allow the login to
work but not the opendirectory?
I expect it's something simple I'm not understanding about timer events.
Please enlighten me.