bug RetryMode:=rmRaise;

Discussion of open issues, suggestions and bugs regarding UniDAC (Universal Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
halenpolen
Posts: 31
Joined: Sun 27 Jun 2010 20:50

bug RetryMode:=rmRaise;

Post by halenpolen » Sat 30 Oct 2010 13:14

I found a bug

I tried to set RetryMode:=rmRaise; when connection lost. but Tuniconnection still to try connect again. it's happen the first time of connection lost, the second is not happen

procedure TMainForm.ConnectionConnectionLost(Sender: TObject;
Component: TComponent; ConnLostCause: TConnLostCause;
var RetryMode: TRetryMode);
begin
RetryMode:=rmRaise;
end;

AlexP
Devart Team
Posts: 5530
Joined: Tue 10 Aug 2010 11:35

Post by AlexP » Mon 01 Nov 2010 14:42

Hello,

Please tell me how you checked that TUniConnection tries to connect again after connection loss? I can not reproduce this behaviour.

halenpolen
Posts: 31
Joined: Sun 27 Jun 2010 20:50

Post by halenpolen » Tue 02 Nov 2010 02:58

[quote="AlexP"]
Please tell me how you checked that TUniConnection tries to connect again after connection loss? [/quote]

i used this demo
Demos\Win32\Miscellaneous\FailOver,

I set RetryMode:=rmRaise

I checked event AfterConnect, the program run this event

procedure TMainForm.ConnectionAfterConnect(Sender: TObject);
begin
btConnect.Enabled := False;
btDisconnect.Enabled := True;
btKillSession.Enabled := True;
end;

AlexP
Devart Team
Posts: 5530
Joined: Tue 10 Aug 2010 11:35

Post by AlexP » Tue 02 Nov 2010 09:47

Hello,

I can not reproduce the problem.
In the FailOver demo project when I check the Failover checkbox and select 'Raise' in the RetryMode combobox, AfterConnect event doesn't arise after connection loss.
Please check that you really set the following property as
DM.Connection.Options.LocalFailover = true
RetryMode = rmRaise

halenpolen
Posts: 31
Joined: Sun 27 Jun 2010 20:50

Post by halenpolen » Tue 02 Nov 2010 13:43

AlexP wrote:Hello,

I can not reproduce the problem.
In the FailOver demo project when I check the Failover checkbox and select 'Raise' in the RetryMode combobox, AfterConnect event doesn't arise after connection loss.
Please check that you really set the following property as
DM.Connection.Options.LocalFailover = true
RetryMode = rmRaise
I know the problem, because I set quDetail.Options.LocalMasterDetail:=false;
when I refresh the master,the detail try to refresh too. and Tuniconnetion run Event ConnectionAfterConnect. Although I set RetryMode with rmRaise, How to stop it??

AlexP
Devart Team
Posts: 5530
Joined: Tue 10 Aug 2010 11:35

Post by AlexP » Thu 04 Nov 2010 10:45

Hello,

I experience such behaviour only if I set the RetryMode variable to the rmReconnect value, if I set it to the rmRaise value the AfterConnect event doesn't arise even if the LocalMasterDetail property is set to false.

Post Reply