By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,688 Members | 1,229 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,688 IT Pros & Developers. It's quick & easy.

Creating a Windows Service in vb.net

P: n/a
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
Bob H.
Nov 22 '05 #1
Share this Question
Share on Google+
4 Replies


P: n/a
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

"BobHutch" wrote:
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
Bob H.

Nov 22 '05 #2

P: n/a
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

"P.Simpe-Asante" wrote:
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

"BobHutch" wrote:
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
Bob H.

Nov 22 '05 #3

P: n/a
P.Simpe-Asante,

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

Bob

"P.Simpe-Asante" wrote:
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

"P.Simpe-Asante" wrote:
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

"BobHutch" wrote:
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
Bob H.

Nov 22 '05 #4

P: 1
Hi Bob

Sorry for dragging up an old thread.

I need to do something simliar to what you did. I can get the service installed and running but my timer is not firing.The OnStart and OnStop code is firing ok so i know the service is running.

I am using vs.net 2005 btw

Any advice?

Thanks
Shane
May 5 '06 #5

This discussion thread is closed

Replies have been disabled for this discussion.