Data module: what changed
Revision 0 to 1. Removed lines have a minus sign; added lines have a plus sign.
Title: Data module
| Old | New | Line | |
|---|---|---|---|
| 1 | + | A **data module** is a database specific kind of pascal unit. Much like a [[TForm]] you can drop components on it, as long as they are non-visible. | |
| 2 | + | ||
| 3 | + | Typically a data module might contain a [[TSQLConnector]] (or a specialized one) and a [[TSQLTransaction]]. | |
| 4 | + | ||
| 5 | + | A new data module can be created using [[IDE Window: New Item|File|New...]] | |
| 6 | + | ||
| 7 | + | <figure> | |
| 8 | + | <img src="datamodule.png" title="datamodule.png" /> | |
| 9 | + | <figcaption>datamodule.png</figcaption> | |
| 10 | + | </figure> | |
| 11 | + | ||
| 12 | + | The datamodule above contains three database related items: | |
| 13 | + | ||
| 14 | + | - [[TSQLTransaction]] | |
| 15 | + | - [[TSQLConnector]] | |
| 16 | + | - [[TSQLScript]] | |
| 17 | + | ||
| 18 | + | SQLScript1 sets its transaction to SQLTransaction1 and its DataBase to SQLConnector1 | |
| 19 | + | ||
| 20 | + | --- | |
| 21 | + | *From the Free Pascal wiki, page "Data module", as it stood on 2016-09-23 after a change by Arent, out of the wiki's dump of 2024-05-26. Copyright stays with the author who wrote it, according to the old wiki's [[Licensing]] page. If you have concerns about this material, [message the admin](/wiki-contact).* | |
| 22 | + | Category: Databases |
