Subject Disconnected from server
Author Anthony Ison
Hi all,

I have an application that is occassionally getting disconnected from the
server. This could be caused by many things (eg. access violations in
interbase, powering off the machine, etc). My application can handle these
situations and will continue on its merry way...

I have a separate thread which starts up if it loses the server connection
and polls for the server until it can find it again. (eg. The server may
have been rebooted). The thread will then send a message to my app when the
database is found, and only then will I spend good VCL CPU cycles attempting
to connect to the server.

Does this sound like a bad thing to do???

The TIB_Connection which was killed prematurely still thinks it is
connected. So when I try to reconnect, I attempt to set Connected to false
and that throws an exception because it can't talk to the server.

Is there a way for me to do a reset or something so that the connection
realises it is not connected anymore?

Cheers.
Anthony