myDAC + onConnectionLost = problem

Discussion of open issues, suggestions and bugs regarding MyDAC (Data Access Components for MySQL) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
AlexMik
Posts: 6
Joined: Wed 26 Dec 2007 19:23

myDAC + onConnectionLost = problem

Post by AlexMik » Wed 26 Dec 2007 19:57

Could you help me to solve the following problem:

I'm having no problem with connection to database, but...
the event onConnectionLost doesn't work if connection lost action is immitated (for example: network cable is being removed).
What is the way to show the message window about connection problems?

Thank you for the replay.

Antaeus
Posts: 2098
Joined: Tue 14 Feb 2006 10:14

Post by Antaeus » Thu 27 Dec 2007 08:03

You should also set the LocalFailover option of TMyConnection to True. The OnConnectionLost event will occur on first attempt to access server through this connection after it got broken.

AlexMik
Posts: 6
Joined: Wed 26 Dec 2007 19:23

Post by AlexMik » Fri 28 Dec 2007 21:46

Antaeus wrote:You should also set the LocalFailover option of TMyConnection to True. The OnConnectionLost event will occur on first attempt to access server through this connection after it got broken.
Thank you very much for the quick reply!

Post Reply