Top Previous Next

note Since v2.6.1

Occurs after a connection is silently re-established after connection failure.


TReconnectEvent = procedure(Connection : TMySQLDatabase) of Object;
property OnReconnect: TReconnectEvent;


Write an OnReconnect event handler to take application-specific actions when a connection to database server was dropped and restored for some reasons (for example due to network fail). If TMySQLDatabase components detects connection failure it tries to re-establish it silently. Usually you don't have to worry about this. But this event may be very useful if your application depends on temporary tables which will be dropped after such re-connect.