What Goes in a Data Module?

   

The basic data module is one that is used to contain datasets and data sources. This simple use of the data module enables you to encapsulate database objects, persistent fields, and event handlers for referential integrity, data validation, and the propagation of changes across database tables. The resulting data module can be used with any user interface, as long as there are no references to controls on any specific form. Thus, when committing to the use of data modules, you also must commit to the use of data-aware controls in your user interfaces. In most cases, the existing data-aware controls are sufficient, but you might also need to be prepared to create your own data-aware control classes from nondata -aware control classes, through the use of the TDataLink and related classes.

Data modules also often contain a TCustomConnection descendant for use either by the data components in the data module or by other data module data components .

The next type of data module contains nondatabase controls ”controls such as timers, custom nonvisual components, and so on. Developers often create special custom components for things like registry access, access to devices such as the serial and parallel ports, or to hardware modules. All of these components can also be at home in the data module. This enables them to be shared across applications, just like data components.


   
Top


C++ Builder Developers Guide
C++Builder 5 Developers Guide
ISBN: 0672319721
EAN: 2147483647
Year: 2002
Pages: 253

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net