Subject Re: [IBO] Re: Windows service using IBO (?)
Author Thomas Steinmaurer
Hello Aage,

> Thomas wrote:
> <<
> The AV in the Firebird client library sounds to me like a
> multi-threading issue. Have you designed your Windows Service with IBO
> like a multi-threaded application. A dedicated connection, transaction etc.
> Have you derived your IBO-based Windows Service from IBS_Base?
> >>
> I did not bother with threads here. The test was to write a record
> to a table once every 24 hours. Service install was ok, service
> start was ok, the service wrote to the application event log (using
> LogMessage) when expected to do so, stopping and uninstalling was
> ok. When I added the database stuff, it "bombed". There was just a
> connection, transaction and a DSQL.

What I meant is that you have to work with IBO in a Windows Service like
with a IBO-based multi-threaded application.

The simplest way is to have a single TDataModule and put a TIB_Session
as the first component on that. Then add additional components as you
need them, e.g. TIB_Connection, TIB_Transaction, TIB_DSQL etc.

Your Windows Service class will derive from TService. Make your class
instantiate the TDataModule and then work with that in the
ServiceExecute() method of your service.

Use a TCP/IP connect string, especially for older Firebird clients.

I hadn't a look on the new service stuff in the most recent IBO version
yet, but I'm sure it is top-notch with all bells and whistles.



--
With regards,
Thomas Steinmaurer
http://www.upscene.com/

Professional Tools and Services for Firebird
FB TraceManager, IB LogManager, Database Health Check, Tuning etc.