EPUB | CHM | PDF

TMySQLDatabase.Methods.Reconnect

Top Previous Next

Resets the communication channel to the server.

Syntax:

procedure Recconnect;

Description:

This function will close the connection to the server and attempt to reestablish a new connection to the same server, using all the same parameters previously used. This may be useful for error recovery if a working connection is lost.

When calls Reconnect generated event OnReconnect.

Before calling Reconnect, TMySQLDatabase must be Connected to server. This means that TPSQLDatabase.Open method was called before, or property Connected was set to True. If an application calls Reset and there was no active connection, an exception is raised.

See also: TMySQLDatabase.Events.OnReconnect