RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
TDataModule.OnCreate Event

Occurs when an application instantiates a data module.

Pascal
property OnCreate: TNotifyEvent;
C++
__property TNotifyEvent OnCreate;

Write an OnCreate event handler to take specific actions when an application instantiates a data module. For example, if a data module contains database and dataset components, an application may establish a database connection immediately. If the data module contains timers, the application may initialize them.

Note: Use of the OnCreate event is discouraged in C++ because it can interact badly with the data module's constructor (see OldCreateOrder). It is recommended that you override the constructor instead.
 

Copyright(C) 2009 Embarcadero Technologies, Inc. All Rights Reserved.
What do you think about this topic? Send feedback!