Solved

Writing Service in VB - Need help urgently

Posted on 2003-11-06
6
296 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
6 Comments
 
LVL 5

Accepted Solution

by:
fantasy1001 earned 34 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 33 total points
ID: 9698393
0
 

Assisted Solution

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

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Enums (shorthand for ‘enumerations’) are not often used by programmers but they can be quite valuable when they are.  What are they? An Enum is just a type of variable like a string or an Integer, but in this case one that you create that contains…
You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
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 utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

895 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now