Connection timeout

Discussion of open issues, suggestions and bugs regarding MyDAC (Data Access Components for MySQL) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
maciejmt
Posts: 27
Joined: Sun 25 Apr 2010 14:14

Connection timeout

Post by maciejmt » Mon 01 Aug 2011 14:27

Hi Devart team !

I set ConnectionTimeout property to 0 in TmyConnection object, but it doesn't work when I change system date (for example 1 day forward).
Query throws exception "Lost connection..."
What should I do, to keep connection of all time ? "try catch" on all queries don't satisfaction me. In timer, periodic sending query to "holding life" also.

I see that AndreyZ missed my topic, I describe more precisly:
MyConnection has set LocalFailover property true, and retrymode to rmReconnect.
Application is running of all times. When user starts working with application (for example 2 days later) application crashes.
DisconnectMode will cause slowing down the program and I would avoid this option.

I think that TmyConnection should have a mechanizm reconnect instead of throwing exception by TMyQuery.

AndreyZ

Post by AndreyZ » Tue 02 Aug 2011 09:56

Hello,

Try using the rmReconnectExecute mode. In this case MyDAC performs reconnection to the server and reexecutes an abortive operation without raising an exception.

maciejmt
Posts: 27
Joined: Sun 25 Apr 2010 14:14

Post by maciejmt » Tue 02 Aug 2011 22:25

Great, many thanks !!

Post Reply