Datasnap.Win.MtsRdm.TMtsDataModule.OnDeactivate

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

property OnDeactivate: TNotifyEvent read FOnDeactivate write FOnDeactivate;

C++

__property System::Classes::TNotifyEvent OnDeactivate = {read=FOnDeActivate, write=FOnDeActivate};

Properties

Type Visibility Source Unit Parent
event published
Datasnap.Win.MtsRdm.pas
Datasnap.Win.MtsRdm.hpp
Datasnap.Win.MtsRdm TMtsDataModule

Description

Occurs when an instance of TMtsDataModule is deactivated.

Write an OnDeactivate event handler to take specific action when COM+ or the MTS proxy releases an instance of the MTS data module. Use this method to close any database connections that were opened when the MTS data module was activated. Database connections must not be left open after the MTS data module is deactivated.

Note: In traditional COM+ and MTS programming, objects release their context object when they are deactivated. However, TMtsDataModule handles this task automatically.

See Also