Data modules are another form-like container that we can find in Delphi. Like forms and frames, they are available both in VCL and FireMonkey frameworks. Unlike them, however, they don't accept controls, but only components. As such, they cannot be used to create graphical user interfaces. Nevertheless, they are excellent storage for datasets, SQL connections, and other non-visual components.
To create a new data module, select File | New | Other and then pick the Data Module icon in the Delphi Files branch. After pressing OK, Delphi will create a new unit and open the form designer. You will not be able to place controls on the design form, and the component palette will reflect this. While the data module is being edited, the component palette will not contain any controls, just non-visual components.
A data module can appear in three different types –...