Localfailover
Posted: Mon 14 Jan 2013 15:18
Hi,
I am using localfailover property to deal with bad networks, but last time customers getting first exception (Lost connection to mysql server...10054) and then after click on OK they get customized message 'Connection failed. Try to connect?'.
When they click on No at " ..Try to connect?" application start to blinks but not terminate?
I am using 7.5.10 version
Regards
I am using localfailover property to deal with bad networks, but last time customers getting first exception (Lost connection to mysql server...10054) and then after click on OK they get customized message 'Connection failed. Try to connect?'.
When they click on No at " ..Try to connect?" application start to blinks but not terminate?
I am using 7.5.10 version
Code: Select all
procedure TDM1.DB1ConnectionLost(Sender: TObject; Component: TComponent;
ConnLostCause: TConnLostCause; var RetryMode: TRetryMode);
begin
if Connectionlost<20 then
begin
RetryMode:=rmReconnectExecute;
Connectionlost:=Connectionlost+1;
end
else
begin
if MessageDlg('Connection failed. Try to connect?',mtConfirmation, [mbYes, mbNo], 0) = mrNo then
begin
Application.Terminate;
end
else
begin
Connectionlost:=0;
RetryMode:=rmReconnectExecute;
end;
end;
end;