Subject Re: [IBO] Crazy IBODataset states
Author Lester Caine
rodbracher wrote:

> below are accurate reported states of my TIBODatabase connection
> status using ConnectinStatus and VerifyConnection. I am finding it
> impossible to tell if my database is actually connected by means of a
> status. Is running an arbitary query the best way to check your
> database is connected? If result do you do `real' stuff otherwise
> (on isc error on query) assume the database is not connected? If I
> did get an error do I try and connect the database again AND run the
> arbitary query again?

OK I've been here many years ago.

1st. What OS and version.
Windows has all sorts of different responses when the network cable is
removed - even when the database is only running locally!
Loosing a network connection can be easy or difficult or detect, and in
some windows setups, pulling the cable also disables TCP/IP altogether
giving different problems.

We run a local copy of Firebird, which the application talks to, and
make sure that the local loopback connector is set up so that pulling
the cable and getting a 'network cable disconnected' message does not
cause windows to close TCP/IP.

Network connections to the remote database then have their own setup,
and failures on that can be monitored. There is no indication that the
network link has been lost UNTIL you try and use it, so the status of
the connection only shows the last operations activities. So you need to
check the error replies, and rollback and reconnect as necessary after a
request has failed.

In my setup, we retry every minute after a failure has been detected,
but the local application only sees the data cached in the local
database, so does not have a problem :)

--
Lester Caine
-----------------------------
L.S.Caine Electronic Services