some customers have often error "The semaphore timeout period has expired"
I've read the articles,
http://forums.devart.com/viewtopic.php?t=22418 (is for SDAC but i think is similar ...)
The event OnLostConnection I already use it and works perfectly !! but does not capture the error "The semaphore timeout period has expired"
obviously,certainly, that the network is unstable on my clients, but I would like to solve the problem via software because when I close and reopen my application all work perfectly ... until new semaphore timeout
What can I do in the event on error to reset the connection and try to restore it?
here is what I did .. but do not seem to work .. can you give me some idea?
Code: Select all
procedure TUniConnectEx.InternalConnectionError(Sender: Tobject; E: EDAError; var Fail: Boolean);
if (E.ErrorCode = 121) then
// if E.ToString = 'TCP Provider: Periodo di timeout del semaforo scaduto.' .... "The semaphore timeout ...." then
begin
LinkedConnection.Disconnect; /// LinkedConnection is TUniConnection
LinkedConnection.Connect;
end;