vcl-171178-expressquantumgrid-tutorials-master-detail-tutorial-step-1-connecting-to-data.md
This tutorial step explains how to create grid Table Views and bind them to different data sources.
Create an empty application project.
Create a database which will be connected to the tables. Place a TDatabase component on a form. Set its properties as follows:
DatabaseName to DemosDB
DriverName to STANDARD
Name to Database
In order to specify connection parameters for the database, double-click on the component. In the opened Database Editor dialog click the Defaults button to obtain a list of all parameters, as well as their default values. Set the PATH parameter to a string which defines a path to the directory where the FILMS, FILMSPERSONSSTAFF, FILMSSCREENS and PERSONS tables are located. Click the OK button to close the Database Editor dialog.
To connect the database to the tables, set its Connected property to True.
DatabaseName to DemosDB
Name to tblFilms
TableName to FILMS.DB
Active to True. Note that the Active property must be set after all other properties are specified.
DatabaseName to DemosDB
Name to tblStaff
TableName to FILMSPERSONSSTAFF.DB
the Active property to True.
DatabaseName to DemosDB
Name to tblFilmScreens
TableName to FILMSSCREENS.DB
Active to True.
DatabaseName to DemosDB
Name to tblPersons
TableName to PERSONS.DB
Active to True.
See Also