Subject Problem reconnecting to the database
Author Peter Vinci
I am having a problem reconnecting to the database after restarting the
firebird service.
I have searched the archives and haven't been able to find a solution.

If I have a simple form with a TIB_Connection and TIB_Events and I loose
the connection, I call
VerifyConnection to verify the connection is down followed by Disconnect
and Connect and it all works fine.

As soon as I add a TIB_DSQL or any other component which sets
TIB_Connection._StatementCount > 0 the problem starts.
After I verify the connection is down and I call both Disconnect and
ForceDisconnect, TIB_Connection.Connected property remains true.
Therefore, calling Connect does not actually connect to the database.

I've tried stepping through the source code and I've found that an
AccessViolation is raised in the
SysUpdateCharacteristics function when calling Disconnect or
ForceDisconnect.
The exception is caught by the Disconnect function but causes the
API_Disconnect call to be bypassed.

Anyone know what could be wrong?

I am using IBO version 4.2.Ie with CPP Builder 6.

Thanks,
Peter.


[Non-text portions of this message have been removed]