
Getting ready
The TFDTable component implements a dataset that works with a single database table. What makes this component amazing is a set of additional features—filtering, indexing, aggregation, cached updates, and persistence.
In this recipe, we'll see some of these at work: how to configure an TFDTable, how to manage the indexes to sort an associated grid, and how to collect new information via aggregates.
This recipe uses the DELPHICOOKBOOK database, an InterBase DB prepared for the last three recipes of this chapter. To speed up the mechanisms, I suggest adding it to the FireDAC connections in the Data Explorer:
- Open Delphi.
- Go to the Data Explorer tab.
- Open the FireDAC section.
- Open the InterBase section.
- Right-click on it.
- Click Add New Connection.
- In the opened window, enter the name, DELPHICOOKBOOK.
- Complete the configuration with this data:
- Username: sysdba
- Password: masterkey
- Database: Choose the path of the database in your filesystem (the database is under the data folder)
Follow the same steps to register the EMPLOYEE database; you can find it at C:\Users\Public\Documents\Embarcadero\Studio\19.0\Samples\data\employee.gdb.