Run the Application (dbExpress Tutorial)

From RAD Studio
Jump to: navigation, search

Go Up to Tutorial: Using dbExpress to View and Update Databases in an Application

Build the application and fix any compilation errors. Run the application and you see this dialog:

TutorialdbExpressInitialDialog.png


Click in the TComboBox in the upper left to display a list of all connections that are listed in Data Explorer. You should have already created at least one database connection in Connect to a Database. As previously noted, only connections that end in the string "CONNECTION" are listed.

In this example, we choose an InterBase connection to a database that is installed with RAD Studio, employee.gdb. Handling the selection of a connection was described in Combo Box Entry Selection.

TutorialdbExpressConnComboBox.png


After selecting the connection, the TListBox shows all the connection's tables. The TListBox was populated by PopulateListBox, described in PopulateListBox.

TutorialdbExpressTableListBox.png


Double-click one of the tables to display table data in the TDBGrid. Handling a table selection was described in Selecting the Table. Table data displays and the TDBNavigator can navigate the data.

TutorialdbExpressTableData.png


Click one of the fields in the TDBGrid to display the field data, as described in Clicking on Table Cell and Add Cell Viewing Form.

TutorialdbExpressFieldFormData.png


You can modify the SQL statement in the TEdit labeled SQL: then check the Open TCheckBox to execute the statement, as described in Open Check Box Click and Change in SQL Command. Note that the TDBGrid now contains only the two columns specified in the SELECT statement.

TutorialdbExpressModSQL.png


Finally, if you modify a table cell's data in the TDBGrid, you can click the Apply Updates TButton to change the database. Database updating was discussed in Add Database Components and Apply Updates Button Click.

Previous

Add Cell Viewing Form

See Also