BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Example of Indy on NT Service

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi Internet Winsock
View previous topic :: View next topic  
Author Message
Prazzoli Stefano
Guest





PostPosted: Mon Dec 20, 2004 3:26 pm    Post subject: Example of Indy on NT Service Reply with 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
Colin Wilson
Guest





PostPosted: Tue Dec 21, 2004 10:25 am    Post subject: Re: Example of Indy on NT Service Reply with quote



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





PostPosted: Fri Dec 24, 2004 3:34 am    Post subject: Re: Example of Indy on NT Service Reply with quote



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
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi Internet Winsock All times are GMT
Page 1 of 1

 
Jump to:  
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


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.