Page 1 of 1

MyConnection.ConnectionTimeout don't work

Posted: Wed 19 Nov 2008 12:58
by eduardosic
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

Posted: Thu 20 Nov 2008 07:12
by Dimon
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.