Solved

Writing Service in VB - Need help urgently

Posted on 2003-11-06
6
301 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

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

Suggested Solutions

There are many ways to remove duplicate entries in an SQL or Access database. Most make you temporarily insert an ID field, make a temp table and copy data back and forth, and/or are slow. Here is an easy way in VB6 using ADO to remove duplicate row…
Most everyone who has done any programming in VB6 knows that you can do something in code like Debug.Print MyVar and that when the program runs from the IDE, the value of MyVar will be displayed in the Immediate Window. Less well known is Debug.Asse…
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…

749 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