RAD Studio VCL Reference
|
Occurs immediately before the connection closes.
property BeforeDisconnect: TNotifyEvent;
__property TNotifyEvent BeforeDisconnect;
Write a BeforeDisconnect event handler to take application-specific actions before dropping a connection.
Delphi Examples:
{ This BeforeDisconnect event handler makes sure that the client dataset has applied all its pending updates before terminating the connection to the server. } procedure TForm1.RemoteServer1BeforeDisconnect(Sender: TObject); begin if (ClientDataSet1.ChangeCount > 0) then ClientDataSet1.ApplyUpdates(-1); end;
Copyright(C) 2009 Embarcadero Technologies, Inc. All Rights Reserved.
|
What do you think about this topic? Send feedback!
|