connect-timeout How is this value set from within Delphi

Forum related to version 6.5.1 (alpha) and 6.6.x (beta) of ZeosLib's DBOs

Moderators: gto, cipto_kh, EgonHugeist

Post Reply
mparak
Senior Boarder
Senior Boarder
Posts: 81
Joined: 12.09.2005, 06:51
Location: Durban South Africa
Contact:

connect-timeout How is this value set from within Delphi

Post 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.
mparak
Senior Boarder
Senior Boarder
Posts: 81
Joined: 12.09.2005, 06:51
Location: Durban South Africa
Contact:

Post by mparak »

I have tried the following:

set @@global.connect_timeout=5

but have not noticed any change.

MParak
www.cad.co.za
Last edited by mparak on 21.08.2008, 13:21, edited 1 time in total.
User avatar
mdaems
Zeos Project Manager
Zeos Project Manager
Posts: 2766
Joined: 20.09.2005, 15:28
Location: Brussels, Belgium
Contact:

Post 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
Post Reply