MyConnection.ConnectionTimeout don't work

Discussion of open issues, suggestions and bugs regarding MyDAC (Data Access Components for MySQL) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
eduardosic
Posts: 387
Joined: Fri 18 Nov 2005 00:26
Location: Brazil

MyConnection.ConnectionTimeout don't work

Post by eduardosic » Wed 19 Nov 2008 12:58

Hi Devart,

MyConnection.ConnectionTimeout don't work.

put a TMyConnection and set a invalid values for Server, set
ConnectionTimeout to any value.. and try to connect.. the time to exception is raised is always the same.

i try to set the value to 0 or 1 or 100, but the time to show exception is always 2 or 3 seconds.

MyDAC 5.70 last build.

thank's

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

Post by Dimon » Thu 20 Nov 2008 07:12

The problem is that if you set the Server property to a server hostname, then MyDAC uses WinSock API 'gethostbyname' function to retrieve corresponding host information. This function returns result only after 2-3 seconds if the hostname is invalid, and MyDAC can't influence it.

Post Reply