?
Solved

Writing Service in VB - Need help urgently

Posted on 2003-11-06
6
Medium Priority
?
325 Views
Last Modified: 2010-05-03
Hi All,

I need to write a service that has to run continuously(This is the first time that am writing a service). But the user has option to start and stop the service.

Since this is running continulosly, i need to take a lot care on performance issue.

1. Since it is running continuously, am using an indefinite while loop to make it run continously.Is it a right way to implement this kind of service?

2. I am using 3 recordset objects for each loop. And I made it as an singleton object. Is it OK?

3. When the service runs on indefinite loop, it uses resource and i am not even able access the stop button in the screen(vb form).

can you pls let me know how to implement a service of this kind and any info for better performance so that it doesn't eat up system resources.

Any info on the above questions will be really helpful to me...As I have just 75 points left with me am alloting it.pls dont mind the points....

Balaji
0
Comment
Question by:balaji_p
3 Comments
 
LVL 5

Accepted Solution

by:
fantasy1001 earned 136 total points
ID: 9698389
Can you use a timer with may be interval of 1 seconds to trigger the services. This can help to release the burden of the computer a bit. You can start and stop the service by just enable/disable the timer
0
 
LVL 9

Assisted Solution

by:Valliappan AN
Valliappan AN earned 132 total points
ID: 9698393
0
 

Assisted Solution

by:ecla
ecla earned 132 total points
ID: 9698754
Use the nstsvc.ocx control it has options to stop and start the service it created...
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction While answering a recent question (http://www.experts-exchange.com/Q_27402310.html) in the VB classic zone, I wrote some VB code in the (Office) VBA environment, rather than fire up my older PC.  I didn't post completely correct code o…
Introduction While answering a recent question about filtering a custom class collection, I realized that this could be accomplished with very little code by using the ScriptControl (SC) library.  This article will introduce you to the SC library a…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Suggested Courses
Course of the Month13 days, 16 hours left to enroll

807 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question