Subject Disconnect Troubles
Author Paul Irwin
I'm trying to handle the situation where I loose a connection to the
database. In the OnError event of the TIB_Connection I have the following
code:

if (ERRCODE == 335544721 && IB_Con->ConnectionStatus != csDisconnectPending)
{
IB_Con->Disconnect();
IB_Con->Connect();
}

I realize there needs to be more code to handle if it cannot connect
again... but this is just some test code. The problem is that Disconnect
generates another error and the connectionstatus gets reset to connected.

How or what is the best way to handle this. I want to prompt the user with
a message that the connection has been lost and allow them to attempt to
reconnect.

Thanks,

Paul