Page 1 of 1

Re-connect

Posted: Fri 15 Dec 2006 12:41
by b00
Hello,

I'm having problem with pool of TMyConnection. When server restarts, all subsequent queries start throuw an exception «Lost communication …», altough server already running. What is the best method to automatically re-connect for persistent clients?

Thanks in advance,
b00

Posted: Fri 15 Dec 2006 17:15
by Antaeus
You can try do add a handler to the MyConnection.OnError event and check the error code. Error codes are described in the MySQL Reference Manual. In the next (fifth) version of MyDAC we will add enhanced support of connection loss handling (Failover).