Solved

Writing Service in VB - Need help urgently

Posted on 2003-11-06
6
295 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

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

I’ve seen a number of people looking for examples of how to access web services from VB6.  I’ve been using a test harness I built in VB6 (using many resources I found online) that I use for small projects to work out how to communicate with web serv…
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…
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…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

758 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

21 Experts available now in Live!

Get 1:1 Help Now