needs help with timer

groadsvb

Well-known member
Joined
Nov 13, 2006
Messages
75
Programming Experience
Beginner
I am writing an application in vb.net 2008 that needs to move data from on server in one data base to another server using sql2005. The application needs to do its work, wait 5 seconds and do its work again. Which timer/interval control is best to use in this scenario? The application will run as a service. Thanks.
 
You should use a System.Timers.Timer. It is similar to a System.Windows.Forms.Timer but not the same. It raises an Elapsed event rather than a Tick event but it serves the same purpose. Also note that once you Start a Windows.Forms.Timer it will keep Ticking until you Stop it. By default the Timers.Timer will raise its Elapsed event once only. To make it raise events continuously you must set its AutoReset property to True.
 
Back
Top