473,472 Members | 2,173 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

timer1.stop

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.
Dec 11 '06 #1
3 2041
cj
I was using VB2003. I upgraded the project to VB2005 and it works as I
first designed it. ????
cj wrote:
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.
Dec 11 '06 #2
Hi cj,

Based on my understanding, the issue:
1) Only occurs in .NET 1.1
2) Only when you're calling Timer.Stop() in the beginning of Tick event
3) Occurs when calling the COM component's OpenDirectory() method

Please correct me if I've misunderstood anything.

To troubleshoot this issue, I have to ask some questions first:
1) What's the exact exception you're seeing?
2) Do you mean removing "Timer1.Stop" in the Tick event will fix the issue?
3) Is it related to the specific com component you're using? I mean, if we
use some other com component in the Tick event, do you still see the issue?
I'm afraid without reproducible project, it's difficult to troubleshoot and
find the root cause on my side.

In the meanwhile, I'll check the implementation changes in the Timer code
from 1.1 to 2.0 to see if there's any break changes.
Sincerely,
Walter Wang (wa****@online.microsoft.com, remove 'online.')
Microsoft Online Community Support

==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscripti...ult.aspx#notif
ications. If you are using Outlook Express, please make sure you clear the
check box "Tools/Options/Read: Get 300 headers at a time" to see your reply
promptly.

Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscripti...t/default.aspx.
==================================================

This posting is provided "AS IS" with no warranties, and confers no rights.


Dec 12 '06 #3
cj
I understand it is hard to solve a problem unless your looking at the
code. I also found that the same program opened and compiled in VB2005
does not have the problem. Given I'm on a tight time frame and there is
no reason this can't be done in VB2005 that's what I'm going to do.

I appreciate your help but I don't have time to figure out why it will
not work in 2003. I'll just use 2005.

Thanks
Walter Wang [MSFT] wrote:
Hi cj,

Based on my understanding, the issue:
1) Only occurs in .NET 1.1
2) Only when you're calling Timer.Stop() in the beginning of Tick event
3) Occurs when calling the COM component's OpenDirectory() method

Please correct me if I've misunderstood anything.

To troubleshoot this issue, I have to ask some questions first:
1) What's the exact exception you're seeing?
2) Do you mean removing "Timer1.Stop" in the Tick event will fix the issue?
3) Is it related to the specific com component you're using? I mean, if we
use some other com component in the Tick event, do you still see the issue?
I'm afraid without reproducible project, it's difficult to troubleshoot and
find the root cause on my side.

In the meanwhile, I'll check the implementation changes in the Timer code
from 1.1 to 2.0 to see if there's any break changes.
Sincerely,
Walter Wang (wa****@online.microsoft.com, remove 'online.')
Microsoft Online Community Support

==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscripti...ult.aspx#notif
ications. If you are using Outlook Express, please make sure you clear the
check box "Tools/Options/Read: Get 300 headers at a time" to see your reply
promptly.

Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscripti...t/default.aspx.
==================================================

This posting is provided "AS IS" with no warranties, and confers no rights.

Dec 12 '06 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
2
by: engsol | last post by:
I'm using Python to parse a bunch of s/w test files and make csv files for later report generation by MS ACCESS....(my boss loves the quick turn-around compared to C). Each log file may contain one...
8
by: Eric Osman | last post by:
My javascript program has reason to want to stop. For example, function A has 5 lines, the second of which calls function B, which has 5 lines, the first of which calls function C. But...
5
by: Paul O. Morris | last post by:
Is there a script that I can run to stop a particular SQL server service on Win2003 server? I'm looking for a similar script to restart that service as well. Thanks.
2
by: Adrian MacNair | last post by:
Hi I need some help if anyone can understand my crap javascript. The problem is that after the slideshow ends (reaches the end of array) it should stop, but the timeout doesn't clear and I can see...
5
2
by: Prasad | last post by:
Hi, I am writing a service which takes a long time to stop after the OnStop call is given by the Services Snap-in. The problem is I cannot cut down on the time that it takes to Stop. The Service...
16
by: deko | last post by:
I have a sub routine that searches the Outlook PST for a message sent to/from a particular email address. Obviously, this can take a long time when the PST contains thousands of messages. I'd...
8
by: Matt Theule | last post by:
While stepping through an ASP.NET project, I found that data was being inserted into my database even though I was not stepping through the code that inserted the data. I have a single page with...
7
by: shai | last post by:
I am working at .net 1.1, writing in c#. I have windows service with a COM object. Every unexpected time The COM object throw an error that make my service get stuck (do not respond). I can catch...
0
by: mattcfisher | last post by:
Hi, I have two windows services running together. One is the main program, and one is an "updater" wrapper for the main. The updater service starts and stops the main one (as in you should never...
10
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
15
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.