Datasnap.Win.MtsRdm.TMtsDataModule.OnActivate

From RAD Studio API Documentation
Jump to: navigation, search

[–] Properties
Type: event
Visibility: published
Source:
Datasnap.Win.MtsRdm.pas
Datasnap.Win.MtsRdm.hpp
Unit: Datasnap.Win.MtsRdm
Parent: TMtsDataModule

Delphi

property OnActivate: TNotifyEvent read FOnActivate write FOnActivate;

C++

__property System::Classes::TNotifyEvent OnActivate = {read=FOnActivate, write=FOnActivate};

Description

Occurs when an instance of TMtsDataModule is activated.

Write an OnActivate event handler to take specific action when COMN+ or the MTS proxy activates the MTS data module. This is the point when any database connections should be established. Database connections must not opened before the MTS data module is activated.

Note: In traditional MTS or COM+ programming, objects acquire their context object when they are activated. However, TMtsDataModule handles this task automatically.

See Also