TDataModule centralizes the handling of nonvisual components in an application.
TDataModule = class(TComponent);
class TDataModule : public TComponent;
Use a TDataModule object in an application to provide a location for centralized handling of nonvisual components. Typically these are data access components, such as TSQLDataSet, and TSQLConnection. DataModules are not limited to data access components, they can also contain other nonvisual components, such as TTimer, TOpenDialog, or TImageList).
At design time a TDataModule object provides a visual container into which a developer can place nonvisual components, set their properties, and write event handlers for them. To create a data module at design time, choose File | New Data Module.
In the unit file for the data module a developer may also place any business rules that are to be applied to the application.
To make the data module available to another unit in the application, select that unit, then choose File|Use Unit (when working in Delphi) or File|Include Unit Header (when working in C++) to add the data module to the uses clause for the unit.
Copyright(C) 2009 Embarcadero Technologies, Inc. All Rights Reserved.
What do you think about this topic? Send feedback!