Page 1 of 1

Connection timeout

Posted: Mon 01 Aug 2011 14:27
by maciejmt
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.

Posted: Tue 02 Aug 2011 09:56
by AndreyZ
Hello,

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

Posted: Tue 02 Aug 2011 22:25
by maciejmt
Great, many thanks !!