TMyConnection.Ping

Discussion of open issues, suggestions and bugs regarding MyDAC (Data Access Components for MySQL) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
google88
Posts: 1
Joined: Thu 02 Apr 2009 16:37

TMyConnection.Ping

Post by google88 » Thu 02 Apr 2009 16:43

Hello all,

Can someone please explain the use TMyConnection.Ping?

According to the help file

procedure Ping;

Description

Use this method if your application has a long time intervals between accessing the server. Ping function allows to avoid automatic disconnection of the client by the server. You can read the details at MySQL Reference Manual (mysql_ping and wait_timeout)

Looking forward to your answers.

Cheers!

NOTE: What I'm trying to do this check if a remote mySQL server/service is running.

Dimon
Devart Team
Posts: 2910
Joined: Mon 05 Mar 2007 16:32

Post by Dimon » Mon 06 Apr 2009 07:06

You should use this method if your connection with server was established some time ago and you need to check whether this connection or the server is working. If the server is not working the method raises an exception.
If you have not established connection you can use the Connect method to check if the MySQL server is running.

Post Reply