Page 1 of 1

connect-timeout How is this value set from within Delphi

Posted: 23.06.2007, 14:09
by mparak
Dear Friends,

I usually ping the remote MySQL using ICMP and if I get a response, go on to attempt to connect. This is a very effecient method of returning with the knowledge that the server is unavailable, without having the application appear ot hang while it waits for connection.
If the server is up, and responding to a ping, but the MySQL instance is not ready to accept the connection, or the MySQL is busy, I am unable ot tello the application to go on with other tasks, and try again later.

How can I set the connect-timeout value to wait 3 seconds, and return control to the calling application, after this period if there is not successful connect.

If anybody out there is able to help, I would be eternally grateful.

Regards

MParak
South Africa.

Posted: 23.06.2007, 14:18
by mparak
I have tried the following:

set @@global.connect_timeout=5

but have not noticed any change.

MParak
www.cad.co.za

Posted: 25.06.2007, 07:57
by mdaems
did you try adding 'timeout=5' to the Tconnection.properties stringlist?

Never tested it but the code is provided in ZDbcMysql unit.

Mark