Example of LocalFailOver in Service Application

Discussion of open issues, suggestions and bugs regarding SDAC (SQL Server Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
Posts: 1
Joined: Mon 26 Oct 2015 03:32

Example of LocalFailOver in Service Application

Post by coder6910 » Wed 18 May 2016 02:19

Do you have an example of using TMS.options.localfailover in a service application? I have a thread that inserts data into SQL Server and would like to use this option to ensure the service can recover from a connection loss. More specifically how do I handle the OnConnectionLost event?


Devart Team
Posts: 1057
Joined: Fri 11 Apr 2014 11:47
Location: Alpha Centauri A

Re: Example of LocalFailOver in Service Application

Post by azyk » Wed 18 May 2016 10:34

SDAC includes FailOver demo project of desktop application, showing how to use the TMSConnection.Options.LocalFailover property and handle the OnConnectionLost event. You can use this demo parts in your service project.

The FailOver demo project is in the "Demos\Miscellaneous\FailOver\" folder, relatively to the SDAC demo projects installation path.

In addition, we recommend to read the Working in an Unstable Network article in our help: http://www.devart.com/sdac/docs/index.h ... etwork.htm

If you have any questions remained after acquaintance with the article and investigation of the demo project, or new questions appear, please ask - we will answer them.

Post Reply