During today's testing I found a couple of inconsistencies, the fix was to sync the checkbox settings with the DM before connect:
Code: Select all
procedure TMainForm.ConnectionBeforeConnect(Sender: TObject);
begin
FShouldNotUpdateControls := True;
try
DM.Connection.Options.LocalFailover := cbFailover.Checked;
DM.Connection.Pooling := cbPooling.Checked;
DM.quDetail.CachedUpdates := cbCachedUpdates.Checked;
DM.quDetail.Options.LocalMasterDetail := cbLocalMasterDetail.Checked;
DM.quDetail.SpecificOptions.Values['FetchAll'] := BoolToStr(cbFetchAll.Checked, True);
DM.Connection.Options.DisconnectedMode := cbDisconnectedMode.Checked;
DM.quMaster.Debug := cbDebug.Checked;
meLog.Lines.Add(Format('Failover: %d, Pooling: %d, CachedUpdates: %d, LocalMaster: %d, FetchAll: %d, DisconnectedMode: %d',
[Ord(cbFailover.Checked), Ord(cbPooling.Checked), Ord(cbCachedUpdates.Checked),
Ord(cbLocalMasterDetail.Checked), Ord(cbFetchAll.Checked),Ord(cbDisconnectedMode.Checked)]));
finally
FShouldNotUpdateControls := False;
end;
end;
After that I reran my tests and below are the log entries. For my purpose only the top row of the master was altered and posted.
Code: Select all
Failover: 1, Pooling: 1, CachedUpdates: 0, LocalMaster: 0, FetchAll: 1, DisconnectedMode: 0
Provider: SQL Server
Transaction.IsolationLevel: 0
11:15:32 AM Session was killed
11:15:38 AM - Connection lost during SQL execution
Provider: SQL Server
Transaction.IsolationLevel: 0
==========================================
Failover: 1, Pooling: 1, CachedUpdates: 0, LocalMaster: 0, FetchAll: 1, DisconnectedMode: 0
Provider: MySQL
Transaction.IsolationLevel: 0
11:16:31 AM Session was killed
11:16:36 AM - Connection lost during SQL execution
Provider: MySQL
Transaction.IsolationLevel: 0
==========================================
Failover: 1, Pooling: 0, CachedUpdates: 0, LocalMaster: 0, FetchAll: 1, DisconnectedMode: 0
Provider: InterBase
Transaction.IsolationLevel: 0
11:18:51 AM Session was killed
connection shutdown
As you can see the only change in settings is Pooling due to the error reported before.
Yet Interbase errors with
connection shutdown without firing the ConnectionLost Event.