Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Timer or Service to run

Status
Not open for further replies.

StevenK

Programmer
Jan 5, 2001
1,294
GB
I'm creating an application that is used to import data from a text file (updated externally by another system) into a SQL server database table. I was thinking of running the application using a Timer component, importing data as required every couple of hours or so. For this the application would need to be active constantly on the server.
Alternatively it has been suggested that I could run this as a service on the server. Would this be appropriate, how hard is this to set up and can anyone give me a head start ?
Thanks in advance.
Steve
 
Creating a service is a great way to do something like that because your average enduser can't turn it off. Also, the service can be started without anyone logged into the server, as opposed to an application which requires someone to be logged in.

Delphi has a "service application" that you can use to create your service. It encapsulates the installation of the service, and gives you events for starting and stopping the service.

Some sample apps are available from a user group I attend -
The October 1999 meeting covered Services.

Good luck!
TealWren
 
I am not sure if I got it correct. Running a service is the best option, but is it going to be on the client machine? If so how many clients are there? How frequent are the upgrades? Are the clients in the same location or across the country?
If you run it off the server, then you don't have to bother about the above, but you probably have to deal with down time, depends on the way you set it.

Welcome to the Pythian Games!
Long live Godess Athena!
dArktEmplAr of Delphi Oracle
 
Another approach may be to create the code to do the read / insert as a small app then use Microsoft’s scheduled tasks to run the code when, and as often as you like

You could do this on the server which normally does not get shut down thus not missing any scheduled activates.


X-) Billy H

bhogar@acxiom.co.uk
 
Thanks for the pointers people. TealWren - the link you provided results in a 'Page Not Found' error. :(
Has the page gone or was there a typo in the address ?
Thanks again
Steve
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top