Subject RE: [firebird-support] Immediate connection to server fails after startup
Author Leyne, Sean
> >I recently changed my computer and along with it the OS from W2K to
XP
> Pro.
> >An application that is started in the Autostart Folder connects to
the FB
> >server on the same maschine right at applications start. On the old
PC
> with
> >W2K, this worked
> >without problems. On the new maschine I am getting the error
> >"Unavailable Database".
> >
> >If I set the application to not to connect immediately and instead do
it
> >myself a few seconds after it started, connection is established w/o
a
> >problem.
> >Firebird.log does not yield anything exept that Guardian has started
the
> >server.
> >
> >Connection protocol is cpLocal, system restore of XP is switched off
for
> the
> >partition where the database sits.
> >Firebird is SS Version 1.5.2
> >
> >Is it possible that the service is started to late and is therefore
not
> yet
> >ready when the application tries to connect?
>
> Yes, that's exactly the problem. Windows makes its own decisions
about
> when to start services.

Fortunately, there are a couple of ways to work around this problem.

If you are creating a service, you can define the service as being
dependent on another service -- to ensure that Firebird is running
before you start.

If you are creating a program -- the only solution I am aware if is:
incorporate a small function which polls the Firebird IP port for a
response, into the application start. Once the polling function gets a
response, the rest of the application start can continue.


Sean


>
> ./heLen
>
>
>
>
>
> Yahoo! Groups Links
>
>
>
>
>
>