 |
BorlandTalk.com Borland discussion newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
Prazzoli Stefano Guest
|
Posted: Mon Dec 20, 2004 3:26 pm Post subject: Example of Indy on NT Service |
|
|
I need my app to run as a NT Service Application (TServiceApplication).
Also, my application will need to have multithreaded database access. Does
anyone have an examples of doing this with Indy components?
Thanks
Stefano
|
|
| Back to top |
|
 |
Colin Wilson Guest
|
Posted: Tue Dec 21, 2004 10:25 am Post subject: Re: Example of Indy on NT Service |
|
|
Prazzoli Stefano wrote:
| Quote: | I need my app to run as a NT Service Application
(TServiceApplication). Also, my application will need to have
multithreaded database access. Does anyone have an examples of doing
this with Indy components?
|
Have a look at my XanaNewz 2 nntp server at
http://www.wilsonc.demon.co.uk/d7xananewz2.htm...
* It's an NT service using Indy 9
* It has a '-debug' switch, so you can run it as a regular
application, too - which is handy for debugging.
* It has a GUI which you get at from a tray icon.
* It does multithreaded database access (though it uses it's own
database system, rather than a third party one).
* It's free and comes with Delphi 7 source.
--
Colin - Author of XanaNews 1.17.1.0
web: http://www.wilsonc.demon.co.uk/delphi.htm
|
|
| Back to top |
|
 |
NindzaKornjaca Guest
|
Posted: Fri Dec 24, 2004 3:34 am Post subject: Re: Example of Indy on NT Service |
|
|
Here is what I do:
1. Create your app as TServiceApplication
2. Add DataModule to it (let's call it MainModule) which will NOT be used
for data access stuff. Add TIdTCPServer to it and do all your programming
here (as if it were TForm)
3. For database access create another (template) datamodule (let's call it
DM) and all data access classes and logic. This data module will be used in
every thread i.e.
in TCPServer.OnConnect where you validate user, you can do
myDM := TDM.Create(AThread.Connection)
Nick
"Prazzoli Stefano" <prazzoli (AT) computerline2001 (DOT) com> wrote
| Quote: | I need my app to run as a NT Service Application (TServiceApplication).
Also, my application will need to have multithreaded database access. Does
anyone have an examples of doing this with Indy components?
Thanks
Stefano
|
|
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|