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

> I've written a very simple Windows service using Delphi/XE2. I'm
> running WinXP/SP3.
> Installing and starting the service works fine, but when I try to
> connect to a database it fails.
> The message in the event log is.
> --------------------
> Access violation at address 1001F266 in module 'fbclient.dll'. Write
> of address 0000004C.
> --------------------
> In design mode (in the IDE) "Connect" succeeds.
> The connect is attempted in the execute method (not during start service).
> If I don't use the database (commenting out the connect, insert,
> commit and disconnect) I can see the it works as expected from the
> messages it writes to the application event log.
> Should I run it as a specific user (or the default "Local System
> account")? Should I check the "Allow service to interact with
> desktop"? I haven't yet tried this one.
> Will this be different if I put the service on Win2008/R2 (server).
>
> Is there anything "special" that one must do to make database access
> work in the service? (I think the answer is "Yes" - but what?)

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?


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

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