Groups | Blog | Home
all groups > dotnet general > december 2004 >

dotnet general : Creating a Windows Service in vb.net



BobHutch
12/22/2004 9:31:02 PM
I am trying to create a windows service using vb.net to read a sql table
every half hour and copy all new records created within each half hour
increment to another table. I also want to be able to email each new record
to a specific person. This system will need to run automatically. I know I
can do this using an exe com component using windows scheduler to trigger the
com componet, but I think that I can create the same type of application
using vb.net to create a windows service. Can I use this approach and is
there any good examples of using vb.net sql database commands when creating a
windows service?

Thank you
P.Simpe-Asante
12/23/2004 1:31:03 AM
Hi Bob,

Sounds like a Windows service is probably your best bet, and it works quite
well... I've done this myself a few times before for my clients, so
unfortunately I can't show my own code here - have a look at this example
(includes Timer-based functionality):

http://www.developerfusion.com/show/3441/1/

HTH,
Patrick

[quoted text, click to view]
P.Simpe-Asante
12/23/2004 1:35:03 AM
One more thing - in most (but not all) cases, code that you write in a
'normal' .NET application will also work in a Service, including sql database
commands...

Patrick

[quoted text, click to view]
BobHutch
12/26/2004 1:55:02 PM
P.Simpe-Asante,

Thank you very much. I was able to get it to work.

Bob

[quoted text, click to view]
AddThis Social Bookmark Button